set host in read function

This commit is contained in:
Jon Perritt 2015-01-14 11:58:52 -07:00
parent 8e6e7909cb
commit dd4155fa80
1 changed files with 2 additions and 0 deletions

View File

@ -205,10 +205,12 @@ func resourceComputeInstanceRead(d *schema.ResourceData, meta interface{}) error
pa := paRaw.(map[string]interface{}) pa := paRaw.(map[string]interface{})
if pa["version"].(float64) == 4 { if pa["version"].(float64) == 4 {
host = pa["addr"].(string) host = pa["addr"].(string)
d.Set("access_ip_v4", host)
} }
} }
} }
} }
d.Set("host", host)
log.Printf("host: %s", host) log.Printf("host: %s", host)