diff --git a/opennebula/resource_opennebula_virtual_machine.go b/opennebula/resource_opennebula_virtual_machine.go index 4bcc28843..09f4c5562 100644 --- a/opennebula/resource_opennebula_virtual_machine.go +++ b/opennebula/resource_opennebula_virtual_machine.go @@ -81,6 +81,14 @@ func nicComputedVMFields() map[string]*schema.Schema { Type: schema.TypeString, Computed: true, }, + "computed_ip6_global": { + Type: schema.TypeString, + Computed: true, + }, + "computed_ip6_link": { + Type: schema.TypeString, + Computed: true, + }, "computed_mac": { Type: schema.TypeString, Computed: true, @@ -890,6 +898,12 @@ func flattenVMNICComputed(NICConfig map[string]interface{}, NIC shared.NIC) map[ if len(NICConfig["ip"].(string)) > 0 { NICMap["ip"] = NICMap["computed_ip"] } + if len(NICConfig["ip6_global"].(string)) > 0 { + NICMap["ip6_global"] = NICMap["computed_ip6_global"] + } + if len(NICConfig["ip6_link"].(string)) > 0 { + NICMap["ip6_link"] = NICMap["computed_ip6_link"] + } if len(NICConfig["mac"].(string)) > 0 { NICMap["mac"] = NICMap["computed_mac"] } diff --git a/opennebula/shared_schemas.go b/opennebula/shared_schemas.go index df279d516..96a348f97 100644 --- a/opennebula/shared_schemas.go +++ b/opennebula/shared_schemas.go @@ -192,6 +192,14 @@ func nicFields() map[string]*schema.Schema { Type: schema.TypeString, Optional: true, }, + "ip6_global": { + Type: schema.TypeString, + Optional: true, + }, + "ip6_link": { + Type: schema.TypeString, + Optional: true, + }, "mac": { Type: schema.TypeString, Optional: true,