diff --git a/README.md b/README.md index aa6c6418b6..90eb32933e 100644 --- a/README.md +++ b/README.md @@ -227,6 +227,7 @@ Then perform the following commands on the root folder: | release\_channel | The release channel of this cluster | | service\_account | The service account to default running nodes as if not overridden in `node_pools`. | | type | Cluster type (regional / zonal) | +| vertical\_pod\_autoscaling\_enabled | Whether vertical pod autoscaling enabled | | zones | List of zones in which the cluster resides | diff --git a/autogen/main/main.tf.tmpl b/autogen/main/main.tf.tmpl index f14f295214..8a48b7e005 100644 --- a/autogen/main/main.tf.tmpl +++ b/autogen/main/main.tf.tmpl @@ -147,13 +147,13 @@ locals { cluster_output_network_policy_enabled = google_container_cluster.primary.addons_config.0.network_policy_config.0.disabled cluster_output_http_load_balancing_enabled = google_container_cluster.primary.addons_config.0.http_load_balancing.0.disabled cluster_output_horizontal_pod_autoscaling_enabled = google_container_cluster.primary.addons_config.0.horizontal_pod_autoscaling.0.disabled + cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false {% if beta_cluster %} # BETA features cluster_output_istio_disabled = google_container_cluster.primary.addons_config.0.istio_config != null && length(google_container_cluster.primary.addons_config.0.istio_config) == 1 ? google_container_cluster.primary.addons_config.0.istio_config.0.disabled : false cluster_output_pod_security_policy_enabled = google_container_cluster.primary.pod_security_policy_config != null && length(google_container_cluster.primary.pod_security_policy_config) == 1 ? google_container_cluster.primary.pod_security_policy_config.0.enabled : false cluster_output_intranode_visbility_enabled = google_container_cluster.primary.enable_intranode_visibility - cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false cluster_output_identity_service_enabled = google_container_cluster.primary.identity_service_config != null && length(google_container_cluster.primary.identity_service_config) == 1 ? google_container_cluster.primary.identity_service_config.0.enabled : false # /BETA features @@ -197,6 +197,7 @@ locals { {% endif %} cluster_http_load_balancing_enabled = ! local.cluster_output_http_load_balancing_enabled cluster_horizontal_pod_autoscaling_enabled = ! local.cluster_output_horizontal_pod_autoscaling_enabled + cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled workload_identity_enabled = ! (var.identity_namespace == null || var.identity_namespace == "null") cluster_workload_identity_config = ! local.workload_identity_enabled ? [] : var.identity_namespace == "enabled" ? [{ workload_pool = "${var.project_id}.svc.id.goog" }] : [{ workload_pool = var.identity_namespace @@ -208,7 +209,6 @@ locals { cluster_telemetry_type_is_set = var.cluster_telemetry_type != null cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled - cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : [] # /BETA features diff --git a/autogen/main/outputs.tf.tmpl b/autogen/main/outputs.tf.tmpl index 1aa6dadae8..9c002d0fdf 100644 --- a/autogen/main/outputs.tf.tmpl +++ b/autogen/main/outputs.tf.tmpl @@ -124,6 +124,11 @@ output "horizontal_pod_autoscaling_enabled" { value = local.cluster_horizontal_pod_autoscaling_enabled } +output "vertical_pod_autoscaling_enabled" { + description = "Whether vertical pod autoscaling enabled" + value = local.cluster_vertical_pod_autoscaling_enabled +} + {% if autopilot_cluster != true %} output "node_pools_names" { description = "List of node pools names" @@ -203,11 +208,6 @@ output "intranode_visibility_enabled" { value = local.cluster_intranode_visibility_enabled } -output "vertical_pod_autoscaling_enabled" { - description = "Whether veritical pod autoscaling is enabled" - value = local.cluster_vertical_pod_autoscaling_enabled -} - output "identity_service_enabled" { description = "Whether Identity Service is enabled" value = local.cluster_pod_security_policy_enabled diff --git a/main.tf b/main.tf index 8eb8b7c473..3b9f459ca2 100644 --- a/main.tf +++ b/main.tf @@ -107,6 +107,7 @@ locals { cluster_output_network_policy_enabled = google_container_cluster.primary.addons_config.0.network_policy_config.0.disabled cluster_output_http_load_balancing_enabled = google_container_cluster.primary.addons_config.0.http_load_balancing.0.disabled cluster_output_horizontal_pod_autoscaling_enabled = google_container_cluster.primary.addons_config.0.horizontal_pod_autoscaling.0.disabled + cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false master_authorized_networks_config = length(var.master_authorized_networks) == 0 ? [] : [{ @@ -138,6 +139,7 @@ locals { cluster_network_policy_enabled = !local.cluster_output_network_policy_enabled cluster_http_load_balancing_enabled = !local.cluster_output_http_load_balancing_enabled cluster_horizontal_pod_autoscaling_enabled = !local.cluster_output_horizontal_pod_autoscaling_enabled + cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled workload_identity_enabled = !(var.identity_namespace == null || var.identity_namespace == "null") cluster_workload_identity_config = !local.workload_identity_enabled ? [] : var.identity_namespace == "enabled" ? [{ workload_pool = "${var.project_id}.svc.id.goog" }] : [{ workload_pool = var.identity_namespace diff --git a/modules/beta-autopilot-private-cluster/README.md b/modules/beta-autopilot-private-cluster/README.md index bf0188ffc4..608f28b8f1 100644 --- a/modules/beta-autopilot-private-cluster/README.md +++ b/modules/beta-autopilot-private-cluster/README.md @@ -161,7 +161,7 @@ Then perform the following commands on the root folder: | service\_account | The service account to default running nodes as if not overridden in `node_pools`. | | tpu\_ipv4\_cidr\_block | The IP range in CIDR notation used for the TPUs | | type | Cluster type (regional / zonal) | -| vertical\_pod\_autoscaling\_enabled | Whether veritical pod autoscaling is enabled | +| vertical\_pod\_autoscaling\_enabled | Whether vertical pod autoscaling enabled | | zones | List of zones in which the cluster resides | diff --git a/modules/beta-autopilot-private-cluster/main.tf b/modules/beta-autopilot-private-cluster/main.tf index fd72a8fb3c..613be8b4ff 100644 --- a/modules/beta-autopilot-private-cluster/main.tf +++ b/modules/beta-autopilot-private-cluster/main.tf @@ -84,13 +84,13 @@ locals { cluster_output_network_policy_enabled = google_container_cluster.primary.addons_config.0.network_policy_config.0.disabled cluster_output_http_load_balancing_enabled = google_container_cluster.primary.addons_config.0.http_load_balancing.0.disabled cluster_output_horizontal_pod_autoscaling_enabled = google_container_cluster.primary.addons_config.0.horizontal_pod_autoscaling.0.disabled + cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false # BETA features - cluster_output_istio_disabled = google_container_cluster.primary.addons_config.0.istio_config != null && length(google_container_cluster.primary.addons_config.0.istio_config) == 1 ? google_container_cluster.primary.addons_config.0.istio_config.0.disabled : false - cluster_output_pod_security_policy_enabled = google_container_cluster.primary.pod_security_policy_config != null && length(google_container_cluster.primary.pod_security_policy_config) == 1 ? google_container_cluster.primary.pod_security_policy_config.0.enabled : false - cluster_output_intranode_visbility_enabled = google_container_cluster.primary.enable_intranode_visibility - cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false - cluster_output_identity_service_enabled = google_container_cluster.primary.identity_service_config != null && length(google_container_cluster.primary.identity_service_config) == 1 ? google_container_cluster.primary.identity_service_config.0.enabled : false + cluster_output_istio_disabled = google_container_cluster.primary.addons_config.0.istio_config != null && length(google_container_cluster.primary.addons_config.0.istio_config) == 1 ? google_container_cluster.primary.addons_config.0.istio_config.0.disabled : false + cluster_output_pod_security_policy_enabled = google_container_cluster.primary.pod_security_policy_config != null && length(google_container_cluster.primary.pod_security_policy_config) == 1 ? google_container_cluster.primary.pod_security_policy_config.0.enabled : false + cluster_output_intranode_visbility_enabled = google_container_cluster.primary.enable_intranode_visibility + cluster_output_identity_service_enabled = google_container_cluster.primary.identity_service_config != null && length(google_container_cluster.primary.identity_service_config) == 1 ? google_container_cluster.primary.identity_service_config.0.enabled : false # /BETA features @@ -117,18 +117,18 @@ locals { cluster_monitoring_service = local.cluster_output_monitoring_service cluster_http_load_balancing_enabled = !local.cluster_output_http_load_balancing_enabled cluster_horizontal_pod_autoscaling_enabled = !local.cluster_output_horizontal_pod_autoscaling_enabled + cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled workload_identity_enabled = !(var.identity_namespace == null || var.identity_namespace == "null") cluster_workload_identity_config = !local.workload_identity_enabled ? [] : var.identity_namespace == "enabled" ? [{ workload_pool = "${var.project_id}.svc.id.goog" }] : [{ workload_pool = var.identity_namespace }] # BETA features - cluster_istio_enabled = !local.cluster_output_istio_disabled - cluster_dns_cache_enabled = var.dns_cache - cluster_telemetry_type_is_set = var.cluster_telemetry_type != null - cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled - cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled - cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled - confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : [] + cluster_istio_enabled = !local.cluster_output_istio_disabled + cluster_dns_cache_enabled = var.dns_cache + cluster_telemetry_type_is_set = var.cluster_telemetry_type != null + cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled + cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled + confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : [] # /BETA features diff --git a/modules/beta-autopilot-private-cluster/outputs.tf b/modules/beta-autopilot-private-cluster/outputs.tf index b3b21d9053..c0a333f39c 100644 --- a/modules/beta-autopilot-private-cluster/outputs.tf +++ b/modules/beta-autopilot-private-cluster/outputs.tf @@ -112,6 +112,11 @@ output "horizontal_pod_autoscaling_enabled" { value = local.cluster_horizontal_pod_autoscaling_enabled } +output "vertical_pod_autoscaling_enabled" { + description = "Whether vertical pod autoscaling enabled" + value = local.cluster_vertical_pod_autoscaling_enabled +} + output "service_account" { description = "The service account to default running nodes as if not overridden in `node_pools`." @@ -167,11 +172,6 @@ output "intranode_visibility_enabled" { value = local.cluster_intranode_visibility_enabled } -output "vertical_pod_autoscaling_enabled" { - description = "Whether veritical pod autoscaling is enabled" - value = local.cluster_vertical_pod_autoscaling_enabled -} - output "identity_service_enabled" { description = "Whether Identity Service is enabled" value = local.cluster_pod_security_policy_enabled diff --git a/modules/beta-autopilot-public-cluster/README.md b/modules/beta-autopilot-public-cluster/README.md index d0abf02521..4a4a800d0a 100644 --- a/modules/beta-autopilot-public-cluster/README.md +++ b/modules/beta-autopilot-public-cluster/README.md @@ -148,7 +148,7 @@ Then perform the following commands on the root folder: | service\_account | The service account to default running nodes as if not overridden in `node_pools`. | | tpu\_ipv4\_cidr\_block | The IP range in CIDR notation used for the TPUs | | type | Cluster type (regional / zonal) | -| vertical\_pod\_autoscaling\_enabled | Whether veritical pod autoscaling is enabled | +| vertical\_pod\_autoscaling\_enabled | Whether vertical pod autoscaling enabled | | zones | List of zones in which the cluster resides | diff --git a/modules/beta-autopilot-public-cluster/main.tf b/modules/beta-autopilot-public-cluster/main.tf index 32fab5a8af..1e69f09336 100644 --- a/modules/beta-autopilot-public-cluster/main.tf +++ b/modules/beta-autopilot-public-cluster/main.tf @@ -83,13 +83,13 @@ locals { cluster_output_network_policy_enabled = google_container_cluster.primary.addons_config.0.network_policy_config.0.disabled cluster_output_http_load_balancing_enabled = google_container_cluster.primary.addons_config.0.http_load_balancing.0.disabled cluster_output_horizontal_pod_autoscaling_enabled = google_container_cluster.primary.addons_config.0.horizontal_pod_autoscaling.0.disabled + cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false # BETA features - cluster_output_istio_disabled = google_container_cluster.primary.addons_config.0.istio_config != null && length(google_container_cluster.primary.addons_config.0.istio_config) == 1 ? google_container_cluster.primary.addons_config.0.istio_config.0.disabled : false - cluster_output_pod_security_policy_enabled = google_container_cluster.primary.pod_security_policy_config != null && length(google_container_cluster.primary.pod_security_policy_config) == 1 ? google_container_cluster.primary.pod_security_policy_config.0.enabled : false - cluster_output_intranode_visbility_enabled = google_container_cluster.primary.enable_intranode_visibility - cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false - cluster_output_identity_service_enabled = google_container_cluster.primary.identity_service_config != null && length(google_container_cluster.primary.identity_service_config) == 1 ? google_container_cluster.primary.identity_service_config.0.enabled : false + cluster_output_istio_disabled = google_container_cluster.primary.addons_config.0.istio_config != null && length(google_container_cluster.primary.addons_config.0.istio_config) == 1 ? google_container_cluster.primary.addons_config.0.istio_config.0.disabled : false + cluster_output_pod_security_policy_enabled = google_container_cluster.primary.pod_security_policy_config != null && length(google_container_cluster.primary.pod_security_policy_config) == 1 ? google_container_cluster.primary.pod_security_policy_config.0.enabled : false + cluster_output_intranode_visbility_enabled = google_container_cluster.primary.enable_intranode_visibility + cluster_output_identity_service_enabled = google_container_cluster.primary.identity_service_config != null && length(google_container_cluster.primary.identity_service_config) == 1 ? google_container_cluster.primary.identity_service_config.0.enabled : false # /BETA features @@ -116,18 +116,18 @@ locals { cluster_monitoring_service = local.cluster_output_monitoring_service cluster_http_load_balancing_enabled = !local.cluster_output_http_load_balancing_enabled cluster_horizontal_pod_autoscaling_enabled = !local.cluster_output_horizontal_pod_autoscaling_enabled + cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled workload_identity_enabled = !(var.identity_namespace == null || var.identity_namespace == "null") cluster_workload_identity_config = !local.workload_identity_enabled ? [] : var.identity_namespace == "enabled" ? [{ workload_pool = "${var.project_id}.svc.id.goog" }] : [{ workload_pool = var.identity_namespace }] # BETA features - cluster_istio_enabled = !local.cluster_output_istio_disabled - cluster_dns_cache_enabled = var.dns_cache - cluster_telemetry_type_is_set = var.cluster_telemetry_type != null - cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled - cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled - cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled - confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : [] + cluster_istio_enabled = !local.cluster_output_istio_disabled + cluster_dns_cache_enabled = var.dns_cache + cluster_telemetry_type_is_set = var.cluster_telemetry_type != null + cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled + cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled + confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : [] # /BETA features diff --git a/modules/beta-autopilot-public-cluster/outputs.tf b/modules/beta-autopilot-public-cluster/outputs.tf index 0950df9513..5ce92e94da 100644 --- a/modules/beta-autopilot-public-cluster/outputs.tf +++ b/modules/beta-autopilot-public-cluster/outputs.tf @@ -112,6 +112,11 @@ output "horizontal_pod_autoscaling_enabled" { value = local.cluster_horizontal_pod_autoscaling_enabled } +output "vertical_pod_autoscaling_enabled" { + description = "Whether vertical pod autoscaling enabled" + value = local.cluster_vertical_pod_autoscaling_enabled +} + output "service_account" { description = "The service account to default running nodes as if not overridden in `node_pools`." @@ -157,11 +162,6 @@ output "intranode_visibility_enabled" { value = local.cluster_intranode_visibility_enabled } -output "vertical_pod_autoscaling_enabled" { - description = "Whether veritical pod autoscaling is enabled" - value = local.cluster_vertical_pod_autoscaling_enabled -} - output "identity_service_enabled" { description = "Whether Identity Service is enabled" value = local.cluster_pod_security_policy_enabled diff --git a/modules/beta-private-cluster-update-variant/README.md b/modules/beta-private-cluster-update-variant/README.md index cacb841390..ce167245f5 100644 --- a/modules/beta-private-cluster-update-variant/README.md +++ b/modules/beta-private-cluster-update-variant/README.md @@ -294,7 +294,7 @@ Then perform the following commands on the root folder: | service\_account | The service account to default running nodes as if not overridden in `node_pools`. | | tpu\_ipv4\_cidr\_block | The IP range in CIDR notation used for the TPUs | | type | Cluster type (regional / zonal) | -| vertical\_pod\_autoscaling\_enabled | Whether veritical pod autoscaling is enabled | +| vertical\_pod\_autoscaling\_enabled | Whether vertical pod autoscaling enabled | | zones | List of zones in which the cluster resides | diff --git a/modules/beta-private-cluster-update-variant/main.tf b/modules/beta-private-cluster-update-variant/main.tf index 1a56147441..74085205f9 100644 --- a/modules/beta-private-cluster-update-variant/main.tf +++ b/modules/beta-private-cluster-update-variant/main.tf @@ -124,13 +124,13 @@ locals { cluster_output_network_policy_enabled = google_container_cluster.primary.addons_config.0.network_policy_config.0.disabled cluster_output_http_load_balancing_enabled = google_container_cluster.primary.addons_config.0.http_load_balancing.0.disabled cluster_output_horizontal_pod_autoscaling_enabled = google_container_cluster.primary.addons_config.0.horizontal_pod_autoscaling.0.disabled + cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false # BETA features - cluster_output_istio_disabled = google_container_cluster.primary.addons_config.0.istio_config != null && length(google_container_cluster.primary.addons_config.0.istio_config) == 1 ? google_container_cluster.primary.addons_config.0.istio_config.0.disabled : false - cluster_output_pod_security_policy_enabled = google_container_cluster.primary.pod_security_policy_config != null && length(google_container_cluster.primary.pod_security_policy_config) == 1 ? google_container_cluster.primary.pod_security_policy_config.0.enabled : false - cluster_output_intranode_visbility_enabled = google_container_cluster.primary.enable_intranode_visibility - cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false - cluster_output_identity_service_enabled = google_container_cluster.primary.identity_service_config != null && length(google_container_cluster.primary.identity_service_config) == 1 ? google_container_cluster.primary.identity_service_config.0.enabled : false + cluster_output_istio_disabled = google_container_cluster.primary.addons_config.0.istio_config != null && length(google_container_cluster.primary.addons_config.0.istio_config) == 1 ? google_container_cluster.primary.addons_config.0.istio_config.0.disabled : false + cluster_output_pod_security_policy_enabled = google_container_cluster.primary.pod_security_policy_config != null && length(google_container_cluster.primary.pod_security_policy_config) == 1 ? google_container_cluster.primary.pod_security_policy_config.0.enabled : false + cluster_output_intranode_visbility_enabled = google_container_cluster.primary.enable_intranode_visibility + cluster_output_identity_service_enabled = google_container_cluster.primary.identity_service_config != null && length(google_container_cluster.primary.identity_service_config) == 1 ? google_container_cluster.primary.identity_service_config.0.enabled : false # /BETA features @@ -163,18 +163,18 @@ locals { cluster_network_policy_enabled = !local.cluster_output_network_policy_enabled cluster_http_load_balancing_enabled = !local.cluster_output_http_load_balancing_enabled cluster_horizontal_pod_autoscaling_enabled = !local.cluster_output_horizontal_pod_autoscaling_enabled + cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled workload_identity_enabled = !(var.identity_namespace == null || var.identity_namespace == "null") cluster_workload_identity_config = !local.workload_identity_enabled ? [] : var.identity_namespace == "enabled" ? [{ workload_pool = "${var.project_id}.svc.id.goog" }] : [{ workload_pool = var.identity_namespace }] # BETA features - cluster_istio_enabled = !local.cluster_output_istio_disabled - cluster_dns_cache_enabled = var.dns_cache - cluster_telemetry_type_is_set = var.cluster_telemetry_type != null - cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled - cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled - cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled - confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : [] + cluster_istio_enabled = !local.cluster_output_istio_disabled + cluster_dns_cache_enabled = var.dns_cache + cluster_telemetry_type_is_set = var.cluster_telemetry_type != null + cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled + cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled + confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : [] # /BETA features diff --git a/modules/beta-private-cluster-update-variant/outputs.tf b/modules/beta-private-cluster-update-variant/outputs.tf index 41152fa2b4..afc6c55618 100644 --- a/modules/beta-private-cluster-update-variant/outputs.tf +++ b/modules/beta-private-cluster-update-variant/outputs.tf @@ -118,6 +118,11 @@ output "horizontal_pod_autoscaling_enabled" { value = local.cluster_horizontal_pod_autoscaling_enabled } +output "vertical_pod_autoscaling_enabled" { + description = "Whether vertical pod autoscaling enabled" + value = local.cluster_vertical_pod_autoscaling_enabled +} + output "node_pools_names" { description = "List of node pools names" value = local.cluster_node_pools_names @@ -186,11 +191,6 @@ output "intranode_visibility_enabled" { value = local.cluster_intranode_visibility_enabled } -output "vertical_pod_autoscaling_enabled" { - description = "Whether veritical pod autoscaling is enabled" - value = local.cluster_vertical_pod_autoscaling_enabled -} - output "identity_service_enabled" { description = "Whether Identity Service is enabled" value = local.cluster_pod_security_policy_enabled diff --git a/modules/beta-private-cluster/README.md b/modules/beta-private-cluster/README.md index cf3fe7381c..09e49fe712 100644 --- a/modules/beta-private-cluster/README.md +++ b/modules/beta-private-cluster/README.md @@ -272,7 +272,7 @@ Then perform the following commands on the root folder: | service\_account | The service account to default running nodes as if not overridden in `node_pools`. | | tpu\_ipv4\_cidr\_block | The IP range in CIDR notation used for the TPUs | | type | Cluster type (regional / zonal) | -| vertical\_pod\_autoscaling\_enabled | Whether veritical pod autoscaling is enabled | +| vertical\_pod\_autoscaling\_enabled | Whether vertical pod autoscaling enabled | | zones | List of zones in which the cluster resides | diff --git a/modules/beta-private-cluster/main.tf b/modules/beta-private-cluster/main.tf index 1a56147441..74085205f9 100644 --- a/modules/beta-private-cluster/main.tf +++ b/modules/beta-private-cluster/main.tf @@ -124,13 +124,13 @@ locals { cluster_output_network_policy_enabled = google_container_cluster.primary.addons_config.0.network_policy_config.0.disabled cluster_output_http_load_balancing_enabled = google_container_cluster.primary.addons_config.0.http_load_balancing.0.disabled cluster_output_horizontal_pod_autoscaling_enabled = google_container_cluster.primary.addons_config.0.horizontal_pod_autoscaling.0.disabled + cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false # BETA features - cluster_output_istio_disabled = google_container_cluster.primary.addons_config.0.istio_config != null && length(google_container_cluster.primary.addons_config.0.istio_config) == 1 ? google_container_cluster.primary.addons_config.0.istio_config.0.disabled : false - cluster_output_pod_security_policy_enabled = google_container_cluster.primary.pod_security_policy_config != null && length(google_container_cluster.primary.pod_security_policy_config) == 1 ? google_container_cluster.primary.pod_security_policy_config.0.enabled : false - cluster_output_intranode_visbility_enabled = google_container_cluster.primary.enable_intranode_visibility - cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false - cluster_output_identity_service_enabled = google_container_cluster.primary.identity_service_config != null && length(google_container_cluster.primary.identity_service_config) == 1 ? google_container_cluster.primary.identity_service_config.0.enabled : false + cluster_output_istio_disabled = google_container_cluster.primary.addons_config.0.istio_config != null && length(google_container_cluster.primary.addons_config.0.istio_config) == 1 ? google_container_cluster.primary.addons_config.0.istio_config.0.disabled : false + cluster_output_pod_security_policy_enabled = google_container_cluster.primary.pod_security_policy_config != null && length(google_container_cluster.primary.pod_security_policy_config) == 1 ? google_container_cluster.primary.pod_security_policy_config.0.enabled : false + cluster_output_intranode_visbility_enabled = google_container_cluster.primary.enable_intranode_visibility + cluster_output_identity_service_enabled = google_container_cluster.primary.identity_service_config != null && length(google_container_cluster.primary.identity_service_config) == 1 ? google_container_cluster.primary.identity_service_config.0.enabled : false # /BETA features @@ -163,18 +163,18 @@ locals { cluster_network_policy_enabled = !local.cluster_output_network_policy_enabled cluster_http_load_balancing_enabled = !local.cluster_output_http_load_balancing_enabled cluster_horizontal_pod_autoscaling_enabled = !local.cluster_output_horizontal_pod_autoscaling_enabled + cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled workload_identity_enabled = !(var.identity_namespace == null || var.identity_namespace == "null") cluster_workload_identity_config = !local.workload_identity_enabled ? [] : var.identity_namespace == "enabled" ? [{ workload_pool = "${var.project_id}.svc.id.goog" }] : [{ workload_pool = var.identity_namespace }] # BETA features - cluster_istio_enabled = !local.cluster_output_istio_disabled - cluster_dns_cache_enabled = var.dns_cache - cluster_telemetry_type_is_set = var.cluster_telemetry_type != null - cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled - cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled - cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled - confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : [] + cluster_istio_enabled = !local.cluster_output_istio_disabled + cluster_dns_cache_enabled = var.dns_cache + cluster_telemetry_type_is_set = var.cluster_telemetry_type != null + cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled + cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled + confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : [] # /BETA features diff --git a/modules/beta-private-cluster/outputs.tf b/modules/beta-private-cluster/outputs.tf index 41152fa2b4..afc6c55618 100644 --- a/modules/beta-private-cluster/outputs.tf +++ b/modules/beta-private-cluster/outputs.tf @@ -118,6 +118,11 @@ output "horizontal_pod_autoscaling_enabled" { value = local.cluster_horizontal_pod_autoscaling_enabled } +output "vertical_pod_autoscaling_enabled" { + description = "Whether vertical pod autoscaling enabled" + value = local.cluster_vertical_pod_autoscaling_enabled +} + output "node_pools_names" { description = "List of node pools names" value = local.cluster_node_pools_names @@ -186,11 +191,6 @@ output "intranode_visibility_enabled" { value = local.cluster_intranode_visibility_enabled } -output "vertical_pod_autoscaling_enabled" { - description = "Whether veritical pod autoscaling is enabled" - value = local.cluster_vertical_pod_autoscaling_enabled -} - output "identity_service_enabled" { description = "Whether Identity Service is enabled" value = local.cluster_pod_security_policy_enabled diff --git a/modules/beta-public-cluster-update-variant/README.md b/modules/beta-public-cluster-update-variant/README.md index bc6a5bdfcd..4a6ecfab53 100644 --- a/modules/beta-public-cluster-update-variant/README.md +++ b/modules/beta-public-cluster-update-variant/README.md @@ -281,7 +281,7 @@ Then perform the following commands on the root folder: | service\_account | The service account to default running nodes as if not overridden in `node_pools`. | | tpu\_ipv4\_cidr\_block | The IP range in CIDR notation used for the TPUs | | type | Cluster type (regional / zonal) | -| vertical\_pod\_autoscaling\_enabled | Whether veritical pod autoscaling is enabled | +| vertical\_pod\_autoscaling\_enabled | Whether vertical pod autoscaling enabled | | zones | List of zones in which the cluster resides | diff --git a/modules/beta-public-cluster-update-variant/main.tf b/modules/beta-public-cluster-update-variant/main.tf index 6c48ce14a6..7ded22eb2c 100644 --- a/modules/beta-public-cluster-update-variant/main.tf +++ b/modules/beta-public-cluster-update-variant/main.tf @@ -123,13 +123,13 @@ locals { cluster_output_network_policy_enabled = google_container_cluster.primary.addons_config.0.network_policy_config.0.disabled cluster_output_http_load_balancing_enabled = google_container_cluster.primary.addons_config.0.http_load_balancing.0.disabled cluster_output_horizontal_pod_autoscaling_enabled = google_container_cluster.primary.addons_config.0.horizontal_pod_autoscaling.0.disabled + cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false # BETA features - cluster_output_istio_disabled = google_container_cluster.primary.addons_config.0.istio_config != null && length(google_container_cluster.primary.addons_config.0.istio_config) == 1 ? google_container_cluster.primary.addons_config.0.istio_config.0.disabled : false - cluster_output_pod_security_policy_enabled = google_container_cluster.primary.pod_security_policy_config != null && length(google_container_cluster.primary.pod_security_policy_config) == 1 ? google_container_cluster.primary.pod_security_policy_config.0.enabled : false - cluster_output_intranode_visbility_enabled = google_container_cluster.primary.enable_intranode_visibility - cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false - cluster_output_identity_service_enabled = google_container_cluster.primary.identity_service_config != null && length(google_container_cluster.primary.identity_service_config) == 1 ? google_container_cluster.primary.identity_service_config.0.enabled : false + cluster_output_istio_disabled = google_container_cluster.primary.addons_config.0.istio_config != null && length(google_container_cluster.primary.addons_config.0.istio_config) == 1 ? google_container_cluster.primary.addons_config.0.istio_config.0.disabled : false + cluster_output_pod_security_policy_enabled = google_container_cluster.primary.pod_security_policy_config != null && length(google_container_cluster.primary.pod_security_policy_config) == 1 ? google_container_cluster.primary.pod_security_policy_config.0.enabled : false + cluster_output_intranode_visbility_enabled = google_container_cluster.primary.enable_intranode_visibility + cluster_output_identity_service_enabled = google_container_cluster.primary.identity_service_config != null && length(google_container_cluster.primary.identity_service_config) == 1 ? google_container_cluster.primary.identity_service_config.0.enabled : false # /BETA features @@ -162,18 +162,18 @@ locals { cluster_network_policy_enabled = !local.cluster_output_network_policy_enabled cluster_http_load_balancing_enabled = !local.cluster_output_http_load_balancing_enabled cluster_horizontal_pod_autoscaling_enabled = !local.cluster_output_horizontal_pod_autoscaling_enabled + cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled workload_identity_enabled = !(var.identity_namespace == null || var.identity_namespace == "null") cluster_workload_identity_config = !local.workload_identity_enabled ? [] : var.identity_namespace == "enabled" ? [{ workload_pool = "${var.project_id}.svc.id.goog" }] : [{ workload_pool = var.identity_namespace }] # BETA features - cluster_istio_enabled = !local.cluster_output_istio_disabled - cluster_dns_cache_enabled = var.dns_cache - cluster_telemetry_type_is_set = var.cluster_telemetry_type != null - cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled - cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled - cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled - confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : [] + cluster_istio_enabled = !local.cluster_output_istio_disabled + cluster_dns_cache_enabled = var.dns_cache + cluster_telemetry_type_is_set = var.cluster_telemetry_type != null + cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled + cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled + confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : [] # /BETA features diff --git a/modules/beta-public-cluster-update-variant/outputs.tf b/modules/beta-public-cluster-update-variant/outputs.tf index d05e54294d..31556abecd 100644 --- a/modules/beta-public-cluster-update-variant/outputs.tf +++ b/modules/beta-public-cluster-update-variant/outputs.tf @@ -118,6 +118,11 @@ output "horizontal_pod_autoscaling_enabled" { value = local.cluster_horizontal_pod_autoscaling_enabled } +output "vertical_pod_autoscaling_enabled" { + description = "Whether vertical pod autoscaling enabled" + value = local.cluster_vertical_pod_autoscaling_enabled +} + output "node_pools_names" { description = "List of node pools names" value = local.cluster_node_pools_names @@ -176,11 +181,6 @@ output "intranode_visibility_enabled" { value = local.cluster_intranode_visibility_enabled } -output "vertical_pod_autoscaling_enabled" { - description = "Whether veritical pod autoscaling is enabled" - value = local.cluster_vertical_pod_autoscaling_enabled -} - output "identity_service_enabled" { description = "Whether Identity Service is enabled" value = local.cluster_pod_security_policy_enabled diff --git a/modules/beta-public-cluster/README.md b/modules/beta-public-cluster/README.md index a2d47544ac..e847a9ff59 100644 --- a/modules/beta-public-cluster/README.md +++ b/modules/beta-public-cluster/README.md @@ -259,7 +259,7 @@ Then perform the following commands on the root folder: | service\_account | The service account to default running nodes as if not overridden in `node_pools`. | | tpu\_ipv4\_cidr\_block | The IP range in CIDR notation used for the TPUs | | type | Cluster type (regional / zonal) | -| vertical\_pod\_autoscaling\_enabled | Whether veritical pod autoscaling is enabled | +| vertical\_pod\_autoscaling\_enabled | Whether vertical pod autoscaling enabled | | zones | List of zones in which the cluster resides | diff --git a/modules/beta-public-cluster/main.tf b/modules/beta-public-cluster/main.tf index 6c48ce14a6..7ded22eb2c 100644 --- a/modules/beta-public-cluster/main.tf +++ b/modules/beta-public-cluster/main.tf @@ -123,13 +123,13 @@ locals { cluster_output_network_policy_enabled = google_container_cluster.primary.addons_config.0.network_policy_config.0.disabled cluster_output_http_load_balancing_enabled = google_container_cluster.primary.addons_config.0.http_load_balancing.0.disabled cluster_output_horizontal_pod_autoscaling_enabled = google_container_cluster.primary.addons_config.0.horizontal_pod_autoscaling.0.disabled + cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false # BETA features - cluster_output_istio_disabled = google_container_cluster.primary.addons_config.0.istio_config != null && length(google_container_cluster.primary.addons_config.0.istio_config) == 1 ? google_container_cluster.primary.addons_config.0.istio_config.0.disabled : false - cluster_output_pod_security_policy_enabled = google_container_cluster.primary.pod_security_policy_config != null && length(google_container_cluster.primary.pod_security_policy_config) == 1 ? google_container_cluster.primary.pod_security_policy_config.0.enabled : false - cluster_output_intranode_visbility_enabled = google_container_cluster.primary.enable_intranode_visibility - cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false - cluster_output_identity_service_enabled = google_container_cluster.primary.identity_service_config != null && length(google_container_cluster.primary.identity_service_config) == 1 ? google_container_cluster.primary.identity_service_config.0.enabled : false + cluster_output_istio_disabled = google_container_cluster.primary.addons_config.0.istio_config != null && length(google_container_cluster.primary.addons_config.0.istio_config) == 1 ? google_container_cluster.primary.addons_config.0.istio_config.0.disabled : false + cluster_output_pod_security_policy_enabled = google_container_cluster.primary.pod_security_policy_config != null && length(google_container_cluster.primary.pod_security_policy_config) == 1 ? google_container_cluster.primary.pod_security_policy_config.0.enabled : false + cluster_output_intranode_visbility_enabled = google_container_cluster.primary.enable_intranode_visibility + cluster_output_identity_service_enabled = google_container_cluster.primary.identity_service_config != null && length(google_container_cluster.primary.identity_service_config) == 1 ? google_container_cluster.primary.identity_service_config.0.enabled : false # /BETA features @@ -162,18 +162,18 @@ locals { cluster_network_policy_enabled = !local.cluster_output_network_policy_enabled cluster_http_load_balancing_enabled = !local.cluster_output_http_load_balancing_enabled cluster_horizontal_pod_autoscaling_enabled = !local.cluster_output_horizontal_pod_autoscaling_enabled + cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled workload_identity_enabled = !(var.identity_namespace == null || var.identity_namespace == "null") cluster_workload_identity_config = !local.workload_identity_enabled ? [] : var.identity_namespace == "enabled" ? [{ workload_pool = "${var.project_id}.svc.id.goog" }] : [{ workload_pool = var.identity_namespace }] # BETA features - cluster_istio_enabled = !local.cluster_output_istio_disabled - cluster_dns_cache_enabled = var.dns_cache - cluster_telemetry_type_is_set = var.cluster_telemetry_type != null - cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled - cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled - cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled - confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : [] + cluster_istio_enabled = !local.cluster_output_istio_disabled + cluster_dns_cache_enabled = var.dns_cache + cluster_telemetry_type_is_set = var.cluster_telemetry_type != null + cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled + cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled + confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : [] # /BETA features diff --git a/modules/beta-public-cluster/outputs.tf b/modules/beta-public-cluster/outputs.tf index d05e54294d..31556abecd 100644 --- a/modules/beta-public-cluster/outputs.tf +++ b/modules/beta-public-cluster/outputs.tf @@ -118,6 +118,11 @@ output "horizontal_pod_autoscaling_enabled" { value = local.cluster_horizontal_pod_autoscaling_enabled } +output "vertical_pod_autoscaling_enabled" { + description = "Whether vertical pod autoscaling enabled" + value = local.cluster_vertical_pod_autoscaling_enabled +} + output "node_pools_names" { description = "List of node pools names" value = local.cluster_node_pools_names @@ -176,11 +181,6 @@ output "intranode_visibility_enabled" { value = local.cluster_intranode_visibility_enabled } -output "vertical_pod_autoscaling_enabled" { - description = "Whether veritical pod autoscaling is enabled" - value = local.cluster_vertical_pod_autoscaling_enabled -} - output "identity_service_enabled" { description = "Whether Identity Service is enabled" value = local.cluster_pod_security_policy_enabled diff --git a/modules/private-cluster-update-variant/README.md b/modules/private-cluster-update-variant/README.md index 1473c63425..eb3f1f007b 100644 --- a/modules/private-cluster-update-variant/README.md +++ b/modules/private-cluster-update-variant/README.md @@ -261,6 +261,7 @@ Then perform the following commands on the root folder: | release\_channel | The release channel of this cluster | | service\_account | The service account to default running nodes as if not overridden in `node_pools`. | | type | Cluster type (regional / zonal) | +| vertical\_pod\_autoscaling\_enabled | Whether vertical pod autoscaling enabled | | zones | List of zones in which the cluster resides | diff --git a/modules/private-cluster-update-variant/main.tf b/modules/private-cluster-update-variant/main.tf index 7051be0fc0..b0e83c7b92 100644 --- a/modules/private-cluster-update-variant/main.tf +++ b/modules/private-cluster-update-variant/main.tf @@ -108,6 +108,7 @@ locals { cluster_output_network_policy_enabled = google_container_cluster.primary.addons_config.0.network_policy_config.0.disabled cluster_output_http_load_balancing_enabled = google_container_cluster.primary.addons_config.0.http_load_balancing.0.disabled cluster_output_horizontal_pod_autoscaling_enabled = google_container_cluster.primary.addons_config.0.horizontal_pod_autoscaling.0.disabled + cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false master_authorized_networks_config = length(var.master_authorized_networks) == 0 ? [] : [{ @@ -139,6 +140,7 @@ locals { cluster_network_policy_enabled = !local.cluster_output_network_policy_enabled cluster_http_load_balancing_enabled = !local.cluster_output_http_load_balancing_enabled cluster_horizontal_pod_autoscaling_enabled = !local.cluster_output_horizontal_pod_autoscaling_enabled + cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled workload_identity_enabled = !(var.identity_namespace == null || var.identity_namespace == "null") cluster_workload_identity_config = !local.workload_identity_enabled ? [] : var.identity_namespace == "enabled" ? [{ workload_pool = "${var.project_id}.svc.id.goog" }] : [{ workload_pool = var.identity_namespace diff --git a/modules/private-cluster-update-variant/outputs.tf b/modules/private-cluster-update-variant/outputs.tf index 4c17822106..c3436263f2 100644 --- a/modules/private-cluster-update-variant/outputs.tf +++ b/modules/private-cluster-update-variant/outputs.tf @@ -118,6 +118,11 @@ output "horizontal_pod_autoscaling_enabled" { value = local.cluster_horizontal_pod_autoscaling_enabled } +output "vertical_pod_autoscaling_enabled" { + description = "Whether vertical pod autoscaling enabled" + value = local.cluster_vertical_pod_autoscaling_enabled +} + output "node_pools_names" { description = "List of node pools names" value = local.cluster_node_pools_names diff --git a/modules/private-cluster/README.md b/modules/private-cluster/README.md index 1d2c5c60be..d4c2660502 100644 --- a/modules/private-cluster/README.md +++ b/modules/private-cluster/README.md @@ -239,6 +239,7 @@ Then perform the following commands on the root folder: | release\_channel | The release channel of this cluster | | service\_account | The service account to default running nodes as if not overridden in `node_pools`. | | type | Cluster type (regional / zonal) | +| vertical\_pod\_autoscaling\_enabled | Whether vertical pod autoscaling enabled | | zones | List of zones in which the cluster resides | diff --git a/modules/private-cluster/main.tf b/modules/private-cluster/main.tf index 7051be0fc0..b0e83c7b92 100644 --- a/modules/private-cluster/main.tf +++ b/modules/private-cluster/main.tf @@ -108,6 +108,7 @@ locals { cluster_output_network_policy_enabled = google_container_cluster.primary.addons_config.0.network_policy_config.0.disabled cluster_output_http_load_balancing_enabled = google_container_cluster.primary.addons_config.0.http_load_balancing.0.disabled cluster_output_horizontal_pod_autoscaling_enabled = google_container_cluster.primary.addons_config.0.horizontal_pod_autoscaling.0.disabled + cluster_output_vertical_pod_autoscaling_enabled = google_container_cluster.primary.vertical_pod_autoscaling != null && length(google_container_cluster.primary.vertical_pod_autoscaling) == 1 ? google_container_cluster.primary.vertical_pod_autoscaling.0.enabled : false master_authorized_networks_config = length(var.master_authorized_networks) == 0 ? [] : [{ @@ -139,6 +140,7 @@ locals { cluster_network_policy_enabled = !local.cluster_output_network_policy_enabled cluster_http_load_balancing_enabled = !local.cluster_output_http_load_balancing_enabled cluster_horizontal_pod_autoscaling_enabled = !local.cluster_output_horizontal_pod_autoscaling_enabled + cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled workload_identity_enabled = !(var.identity_namespace == null || var.identity_namespace == "null") cluster_workload_identity_config = !local.workload_identity_enabled ? [] : var.identity_namespace == "enabled" ? [{ workload_pool = "${var.project_id}.svc.id.goog" }] : [{ workload_pool = var.identity_namespace diff --git a/modules/private-cluster/outputs.tf b/modules/private-cluster/outputs.tf index 4c17822106..c3436263f2 100644 --- a/modules/private-cluster/outputs.tf +++ b/modules/private-cluster/outputs.tf @@ -118,6 +118,11 @@ output "horizontal_pod_autoscaling_enabled" { value = local.cluster_horizontal_pod_autoscaling_enabled } +output "vertical_pod_autoscaling_enabled" { + description = "Whether vertical pod autoscaling enabled" + value = local.cluster_vertical_pod_autoscaling_enabled +} + output "node_pools_names" { description = "List of node pools names" value = local.cluster_node_pools_names diff --git a/outputs.tf b/outputs.tf index 414e662a17..7e3fb254c6 100644 --- a/outputs.tf +++ b/outputs.tf @@ -118,6 +118,11 @@ output "horizontal_pod_autoscaling_enabled" { value = local.cluster_horizontal_pod_autoscaling_enabled } +output "vertical_pod_autoscaling_enabled" { + description = "Whether vertical pod autoscaling enabled" + value = local.cluster_vertical_pod_autoscaling_enabled +} + output "node_pools_names" { description = "List of node pools names" value = local.cluster_node_pools_names