Merge pull request #8292 from nwwebb/import-target-pool

provider/google: Changed instances to a computed property of 'google_compute_target_pool'
This commit is contained in:
Lars Wander 2016-08-18 14:16:09 -04:00 committed by GitHub
commit 8d8b186cc3
1 changed files with 3 additions and 0 deletions

View File

@ -55,6 +55,7 @@ func resourceComputeTargetPool() *schema.Resource {
"instances": &schema.Schema{
Type: schema.TypeList,
Optional: true,
Computed: true,
ForceNew: false,
Elem: &schema.Schema{Type: schema.TypeString},
},
@ -396,6 +397,8 @@ func resourceComputeTargetPoolRead(d *schema.ResourceData, meta interface{}) err
d.Set("health_checks", tpool.HealthChecks)
if tpool.Instances != nil {
d.Set("instances", convertInstancesFromUrls(tpool.Instances))
} else {
d.Set("instances", nil)
}
d.Set("name", tpool.Name)
d.Set("region", regionUrl[len(regionUrl)-1])