5353 "addons_config.0.http_load_balancing" ,
5454 "addons_config.0.horizontal_pod_autoscaling" ,
5555 "addons_config.0.network_policy_config" ,
56- "addons_config.0.istio_config" ,
5756 "addons_config.0.cloudrun_config" ,
57+ "addons_config.0.istio_config" ,
5858 "addons_config.0.dns_cache_config" ,
5959 "addons_config.0.gce_persistent_disk_csi_driver_config" ,
6060 "addons_config.0.kalm_config" ,
@@ -236,7 +236,7 @@ func resourceContainerCluster() *schema.Resource {
236236 },
237237 },
238238 },
239- "istio_config " : {
239+ "cloudrun_config " : {
240240 Type : schema .TypeList ,
241241 Optional : true ,
242242 Computed : true ,
@@ -248,17 +248,10 @@ func resourceContainerCluster() *schema.Resource {
248248 Type : schema .TypeBool ,
249249 Required : true ,
250250 },
251- "auth" : {
252- Type : schema .TypeString ,
253- Optional : true ,
254- // We can't use a Terraform-level default because it won't be true when the block is disabled: true
255- DiffSuppressFunc : emptyOrDefaultStringSuppress ("AUTH_NONE" ),
256- ValidateFunc : validation .StringInSlice ([]string {"AUTH_NONE" , "AUTH_MUTUAL_TLS" }, false ),
257- },
258251 },
259252 },
260253 },
261- "cloudrun_config " : {
254+ "istio_config " : {
262255 Type : schema .TypeList ,
263256 Optional : true ,
264257 Computed : true ,
@@ -270,6 +263,13 @@ func resourceContainerCluster() *schema.Resource {
270263 Type : schema .TypeBool ,
271264 Required : true ,
272265 },
266+ "auth" : {
267+ Type : schema .TypeString ,
268+ Optional : true ,
269+ // We can't use a Terraform-level default because it won't be true when the block is disabled: true
270+ DiffSuppressFunc : emptyOrDefaultStringSuppress ("AUTH_NONE" ),
271+ ValidateFunc : validation .StringInSlice ([]string {"AUTH_NONE" , "AUTH_MUTUAL_TLS" }, false ),
272+ },
273273 },
274274 },
275275 },
@@ -2195,19 +2195,19 @@ func expandClusterAddonsConfig(configured interface{}) *containerBeta.AddonsConf
21952195 }
21962196 }
21972197
2198- if v , ok := config ["istio_config " ]; ok && len (v .([]interface {})) > 0 {
2198+ if v , ok := config ["cloudrun_config " ]; ok && len (v .([]interface {})) > 0 {
21992199 addon := v .([]interface {})[0 ].(map [string ]interface {})
2200- ac .IstioConfig = & containerBeta.IstioConfig {
2200+ ac .CloudRunConfig = & containerBeta.CloudRunConfig {
22012201 Disabled : addon ["disabled" ].(bool ),
2202- Auth : addon ["auth" ].(string ),
22032202 ForceSendFields : []string {"Disabled" },
22042203 }
22052204 }
22062205
2207- if v , ok := config ["cloudrun_config " ]; ok && len (v .([]interface {})) > 0 {
2206+ if v , ok := config ["istio_config " ]; ok && len (v .([]interface {})) > 0 {
22082207 addon := v .([]interface {})[0 ].(map [string ]interface {})
2209- ac .CloudRunConfig = & containerBeta.CloudRunConfig {
2208+ ac .IstioConfig = & containerBeta.IstioConfig {
22102209 Disabled : addon ["disabled" ].(bool ),
2210+ Auth : addon ["auth" ].(string ),
22112211 ForceSendFields : []string {"Disabled" },
22122212 }
22132213 }
@@ -2616,19 +2616,19 @@ func flattenClusterAddonsConfig(c *containerBeta.AddonsConfig) []map[string]inte
26162616 }
26172617 }
26182618
2619- if c .IstioConfig != nil {
2620- result ["istio_config " ] = []map [string ]interface {}{
2619+ if c .CloudRunConfig != nil {
2620+ result ["cloudrun_config " ] = []map [string ]interface {}{
26212621 {
2622- "disabled" : c .IstioConfig .Disabled ,
2623- "auth" : c .IstioConfig .Auth ,
2622+ "disabled" : c .CloudRunConfig .Disabled ,
26242623 },
26252624 }
26262625 }
26272626
2628- if c .CloudRunConfig != nil {
2629- result ["cloudrun_config " ] = []map [string ]interface {}{
2627+ if c .IstioConfig != nil {
2628+ result ["istio_config " ] = []map [string ]interface {}{
26302629 {
2631- "disabled" : c .CloudRunConfig .Disabled ,
2630+ "disabled" : c .IstioConfig .Disabled ,
2631+ "auth" : c .IstioConfig .Auth ,
26322632 },
26332633 }
26342634 }
0 commit comments