@@ -40,6 +40,25 @@ locals {
4040
4141 cluster_type = " ${ var . regional ? " regional" : " zonal" } "
4242
43+ cluster_network_policy = {
44+ enabled = [{
45+ enabled = " true"
46+ provider = " ${ var . network_policy_provider } "
47+ }]
48+
49+ disabled = [{
50+ enabled = " false"
51+ }]
52+ }
53+
54+ cluster_cloudrun_config = {
55+ enabled = [{
56+ disabled = " false"
57+ }]
58+
59+ disabled = []
60+ }
61+
4362 cluster_type_output_name = {
4463 regional = " ${ element (concat (google_container_cluster. primary . * . name , list (" " )), 0 )} "
4564 zonal = " ${ element (concat (google_container_cluster. zonal_primary . * . name , list (" " )), 0 )} "
@@ -128,11 +147,6 @@ locals {
128147 zonal = " ${ element (concat (google_container_cluster. zonal_primary . * . addons_config . 0 . istio_config . 0 . disabled , list (" " )), 0 )} "
129148 }
130149
131- cluster_type_output_cloudrun_enabled = {
132- regional = " ${ element (concat (google_container_cluster. primary . * . addons_config . 0 . cloudrun_config . 0 . disabled , list (" " )), 0 )} "
133- zonal = " ${ element (concat (google_container_cluster. zonal_primary . * . addons_config . 0 . cloudrun_config . 0 . disabled , list (" " )), 0 )} "
134- }
135-
136150 cluster_type_output_pod_security_policy_enabled = {
137151 regional = " ${ element (concat (google_container_cluster. primary . * . pod_security_policy_config . 0 . enabled , list (" " )), 0 )} "
138152 zonal = " ${ element (concat (google_container_cluster. zonal_primary . * . pod_security_policy_config . 0 . enabled , list (" " )), 0 )} "
@@ -170,7 +184,7 @@ locals {
170184 cluster_kubernetes_dashboard_enabled = " ${ local . cluster_type_output_kubernetes_dashboard_enabled [local . cluster_type ] ? false : true } "
171185 # BETA features
172186 cluster_istio_enabled = " ${ local . cluster_type_output_istio_enabled [local . cluster_type ] ? false : true } "
173- cluster_cloudrun_enabled = " ${ local . cluster_type_output_cloudrun_enabled [ local . cluster_type ] ? false : true } "
187+ cluster_cloudrun_enabled = " ${ var . cloudrun } "
174188 cluster_pod_security_policy_enabled = " ${ local . cluster_type_output_pod_security_policy_enabled [local . cluster_type ] ? true : false } "
175189
176190 # /BETA features
0 commit comments