typo with netname when no networks are specified

This commit is contained in:
Joe Topjian 2015-04-01 01:56:34 +00:00
parent 30b0fc7489
commit bb81228205
1 changed files with 2 additions and 2 deletions

View File

@ -382,7 +382,7 @@ func resourceComputeInstanceV2Read(d *schema.ResourceData, meta interface{}) err
// Loop through all networks and addresses,
// merge relevant address details.
if len(networkDetails) == 0 {
for _, n := range addresses {
for netName, n := range addresses {
if floatingIP, ok := n["floating_ip"]; ok {
hostv4 = floatingIP.(string)
} else {
@ -396,7 +396,7 @@ func resourceComputeInstanceV2Read(d *schema.ResourceData, meta interface{}) err
}
networks[0] = map[string]interface{}{
"name": n,
"name": netName,
"fixed_ip_v4": n["fixed_ip_v4"],
"fixed_ip_v6": n["fixed_ip_v6"],
"mac": n["mac"],