diff --git a/opennebula/resource_opennebula_virtual_machine.go b/opennebula/resource_opennebula_virtual_machine.go index f4d4e1581..96f3c37bd 100644 --- a/opennebula/resource_opennebula_virtual_machine.go +++ b/opennebula/resource_opennebula_virtual_machine.go @@ -656,8 +656,8 @@ func flattenNICComputed(nic shared.NIC) map[string]interface{} { ip, _ := nic.Get(shared.IP) mac, _ := nic.Get(shared.MAC) physicalDevice, _ := nic.GetStr("PHYDEV") - ip6_global, _ := nic.GetStr("IP6_GLOBAL") - ip6_link, _ := nic.GetStr("IP6_LINK") + ip6Global, _ := nic.GetStr("IP6_GLOBAL") + ip6Link, _ := nic.GetStr("IP6_LINK") network, _ := nic.Get(shared.Network) model, _ := nic.Get(shared.Model) @@ -674,8 +674,8 @@ func flattenNICComputed(nic shared.NIC) map[string]interface{} { "nic_id": nicID, "network": network, "computed_ip": ip, - "computed_ip6_global": ip6_global, - "computed_ip6_link": ip6_link, + "computed_ip6_global": ip6Global, + "computed_ip6_link": ip6Link, "computed_mac": mac, "computed_physical_device": physicalDevice, "computed_model": model, @@ -1388,6 +1388,8 @@ func updateNIC(d *schema.ResourceData, meta interface{}) error { }, "network_id", "ip", + "ip6_global", + "ip6_link", "mac", "security_groups", "model", diff --git a/opennebula/resource_opennebula_virtual_machine_test.go b/opennebula/resource_opennebula_virtual_machine_test.go index 977769840..e21c984e9 100644 --- a/opennebula/resource_opennebula_virtual_machine_test.go +++ b/opennebula/resource_opennebula_virtual_machine_test.go @@ -1407,6 +1407,8 @@ resource "opennebula_virtual_machine" "test" { nic { network_id = opennebula_virtual_network.network1.id ip = "172.16.100.131" + ip6_global = "2001:db8:0:1::1" + ip6_link = "fe80::1" } timeout = 5