mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-04 17:51:11 +00:00
provider/google: Made instances a computed property of 'google_compute_target_pool'
This commit is contained in:
parent
0c5ec16c30
commit
0eb18737cb
@ -55,6 +55,7 @@ func resourceComputeTargetPool() *schema.Resource {
|
|||||||
"instances": &schema.Schema{
|
"instances": &schema.Schema{
|
||||||
Type: schema.TypeList,
|
Type: schema.TypeList,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
|
Computed: true,
|
||||||
ForceNew: false,
|
ForceNew: false,
|
||||||
Elem: &schema.Schema{Type: schema.TypeString},
|
Elem: &schema.Schema{Type: schema.TypeString},
|
||||||
},
|
},
|
||||||
@ -396,6 +397,8 @@ func resourceComputeTargetPoolRead(d *schema.ResourceData, meta interface{}) err
|
|||||||
d.Set("health_checks", tpool.HealthChecks)
|
d.Set("health_checks", tpool.HealthChecks)
|
||||||
if tpool.Instances != nil {
|
if tpool.Instances != nil {
|
||||||
d.Set("instances", convertInstancesFromUrls(tpool.Instances))
|
d.Set("instances", convertInstancesFromUrls(tpool.Instances))
|
||||||
|
} else {
|
||||||
|
d.Set("instances", nil)
|
||||||
}
|
}
|
||||||
d.Set("name", tpool.Name)
|
d.Set("name", tpool.Name)
|
||||||
d.Set("region", regionUrl[len(regionUrl)-1])
|
d.Set("region", regionUrl[len(regionUrl)-1])
|
||||||
|
Loading…
Reference in New Issue
Block a user