provider/google: always set additional_zones on read

This commit is contained in:
Dana Hoffman 2017-02-07 19:21:00 -08:00
parent e0663f35b2
commit 562c25dba8

View File

@ -442,15 +442,15 @@ func resourceContainerClusterRead(d *schema.ResourceData, meta interface{}) erro
d.Set("name", cluster.Name) d.Set("name", cluster.Name)
d.Set("zone", cluster.Zone) d.Set("zone", cluster.Zone)
locations := []string{}
if len(cluster.Locations) > 1 { if len(cluster.Locations) > 1 {
locations := []string{}
for _, location := range cluster.Locations { for _, location := range cluster.Locations {
if location != cluster.Zone { if location != cluster.Zone {
locations = append(locations, location) locations = append(locations, location)
} }
} }
d.Set("additional_zones", locations)
} }
d.Set("additional_zones", locations)
d.Set("endpoint", cluster.Endpoint) d.Set("endpoint", cluster.Endpoint)