Just removing network refresh wont cut it, value from config must be used

This commit is contained in:
Dainis Tillers 2015-04-08 15:38:07 +03:00
parent 8f717c3e60
commit ab71de8650
1 changed files with 2 additions and 1 deletions

View File

@ -546,7 +546,7 @@ func resourceComputeInstanceRead(d *schema.ResourceData, meta interface{}) error
networkInterfaces := make([]map[string]interface{}, 0, 1)
if networkInterfacesCount > 0 {
for _, iface := range instance.NetworkInterfaces {
for i, iface := range instance.NetworkInterfaces {
// The first non-empty ip is left in natIP
var natIP string
accessConfigs := make(
@ -572,6 +572,7 @@ func resourceComputeInstanceRead(d *schema.ResourceData, meta interface{}) error
networkInterfaces = append(networkInterfaces, map[string]interface{}{
"name": iface.Name,
"address": iface.NetworkIP,
"network": d.Get(fmt.Sprintf("network_interface.%d.network", i)),
"access_config": accessConfigs,
})
}