diff --git a/main.tf b/main.tf index c6f6ee6125..b7cb7341bf 100644 --- a/main.tf +++ b/main.tf @@ -73,11 +73,6 @@ locals { zonal = "${element(concat(google_container_cluster.zonal_primary.*.min_master_version, list("")), 0)}" } - cluster_type_output_master_authorized_networks_config = { - regional = "${element(concat(google_container_cluster.primary.*.master_authorized_networks_config, list("")), 0)}" - zonal = "${element(concat(google_container_cluster.zonal_primary.*.master_authorized_networks_config, list("")), 0)}" - } - cluster_type_output_network_policy_enabled = { regional = "${element(concat(google_container_cluster.primary.*.addons_config.0.network_policy_config.0.disabled, list("")), 0)}" zonal = "${element(concat(google_container_cluster.zonal_primary.*.addons_config.0.network_policy_config.0.disabled, list("")), 0)}" @@ -113,17 +108,16 @@ locals { cluster_master_auth_map = "${local.cluster_master_auth_list_layer2[0]}" # cluster locals - cluster_name = "${local.cluster_type_output_name[local.cluster_type]}" - cluster_location = "${local.cluster_type_output_location[local.cluster_type]}" - cluster_region = "${local.cluster_type_output_region[local.cluster_type]}" - cluster_zones = "${sort(local.cluster_type_output_zones[local.cluster_type])}" - cluster_endpoint = "${local.cluster_type_output_endpoint[local.cluster_type]}" - cluster_ca_certificate = "${lookup(local.cluster_master_auth_map, "cluster_ca_certificate")}" - cluster_master_version = "${local.cluster_type_output_master_version[local.cluster_type]}" - cluster_min_master_version = "${local.cluster_type_output_min_master_version[local.cluster_type]}" - cluster_master_authorized_networks_config = "${local.cluster_type_output_master_authorized_networks_config[local.cluster_type]}" - cluster_node_pools_names = "${local.cluster_type_output_node_pools_names[local.cluster_type]}" - cluster_node_pools_versions = "${local.cluster_type_output_node_pools_versions[local.cluster_type]}" + cluster_name = "${local.cluster_type_output_name[local.cluster_type]}" + cluster_location = "${local.cluster_type_output_location[local.cluster_type]}" + cluster_region = "${local.cluster_type_output_region[local.cluster_type]}" + cluster_zones = "${sort(local.cluster_type_output_zones[local.cluster_type])}" + cluster_endpoint = "${local.cluster_type_output_endpoint[local.cluster_type]}" + cluster_ca_certificate = "${lookup(local.cluster_master_auth_map, "cluster_ca_certificate")}" + cluster_master_version = "${local.cluster_type_output_master_version[local.cluster_type]}" + cluster_min_master_version = "${local.cluster_type_output_min_master_version[local.cluster_type]}" + cluster_node_pools_names = "${local.cluster_type_output_node_pools_names[local.cluster_type]}" + cluster_node_pools_versions = "${local.cluster_type_output_node_pools_versions[local.cluster_type]}" cluster_network_policy_enabled = "${local.cluster_type_output_network_policy_enabled[local.cluster_type] ? false : true}" cluster_http_load_balancing_enabled = "${local.cluster_type_output_http_load_balancing_enabled[local.cluster_type] ? false : true}" diff --git a/outputs.tf b/outputs.tf index 8a8c0c9f3d..0ce689569f 100644 --- a/outputs.tf +++ b/outputs.tf @@ -52,7 +52,7 @@ output "min_master_version" { output "master_authorized_networks_config" { description = "Networks from which access to master is permitted" - value = "${local.cluster_master_authorized_networks_config}" + value = "${var.master_authorized_networks_config}" } output "master_version" {