mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Only attempt to get the MAC address if it exists.
This commit is contained in:
parent
0d77232196
commit
30b0fc7489
@ -818,7 +818,9 @@ func resourceInstanceAddresses(addresses map[string]interface{}) map[string]map[
|
||||
addrs[n]["fixed_ip_v6"] = fmt.Sprintf("[%s]", address["addr"].(string))
|
||||
}
|
||||
}
|
||||
addrs[n]["mac"] = address["OS-EXT-IPS-MAC:mac_addr"].(string)
|
||||
if mac, ok := address["OS-EXT-IPS-MAC:mac_addr"]; ok {
|
||||
addrs[n]["mac"] = mac.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user