typo with netname when no networks are specified
This commit is contained in:
parent
30b0fc7489
commit
bb81228205
|
@ -382,7 +382,7 @@ func resourceComputeInstanceV2Read(d *schema.ResourceData, meta interface{}) err
|
||||||
// Loop through all networks and addresses,
|
// Loop through all networks and addresses,
|
||||||
// merge relevant address details.
|
// merge relevant address details.
|
||||||
if len(networkDetails) == 0 {
|
if len(networkDetails) == 0 {
|
||||||
for _, n := range addresses {
|
for netName, n := range addresses {
|
||||||
if floatingIP, ok := n["floating_ip"]; ok {
|
if floatingIP, ok := n["floating_ip"]; ok {
|
||||||
hostv4 = floatingIP.(string)
|
hostv4 = floatingIP.(string)
|
||||||
} else {
|
} else {
|
||||||
|
@ -396,7 +396,7 @@ func resourceComputeInstanceV2Read(d *schema.ResourceData, meta interface{}) err
|
||||||
}
|
}
|
||||||
|
|
||||||
networks[0] = map[string]interface{}{
|
networks[0] = map[string]interface{}{
|
||||||
"name": n,
|
"name": netName,
|
||||||
"fixed_ip_v4": n["fixed_ip_v4"],
|
"fixed_ip_v4": n["fixed_ip_v4"],
|
||||||
"fixed_ip_v6": n["fixed_ip_v6"],
|
"fixed_ip_v6": n["fixed_ip_v6"],
|
||||||
"mac": n["mac"],
|
"mac": n["mac"],
|
||||||
|
|
Loading…
Reference in New Issue