diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index df14839db4..7c2a4e51f8 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -344,21 +344,21 @@ resource "google_container_cluster" "primary" { config_connector_config { enabled = var.config_connector } - {% endif %} - dynamic "gke_backup_agent_config" { - for_each = local.gke_backup_agent_config + dynamic "gcs_fuse_csi_driver_config" { + for_each = local.gcs_fuse_csi_driver_config content { - enabled = gke_backup_agent_config.value.enabled + enabled = gcs_fuse_csi_driver_config.value.enabled } } + {% endif %} - dynamic "gcs_fuse_csi_driver_config" { - for_each = local.gcs_fuse_csi_driver_config + dynamic "gke_backup_agent_config" { + for_each = local.gke_backup_agent_config content { - enabled = gcs_fuse_csi_driver_config.value.enabled + enabled = gke_backup_agent_config.value.enabled } } diff --git a/autogen/main/main.tf.tmpl b/autogen/main/main.tf.tmpl index cc4a14817b..7ba220f38b 100644 --- a/autogen/main/main.tf.tmpl +++ b/autogen/main/main.tf.tmpl @@ -107,9 +107,9 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null + gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] {% endif %} gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false)? [var.ray_operator_config]: [] {% if beta_cluster and autopilot_cluster != true %} diff --git a/autogen/main/variables.tf.tmpl b/autogen/main/variables.tf.tmpl index ada4b15d32..888466a768 100644 --- a/autogen/main/variables.tf.tmpl +++ b/autogen/main/variables.tf.tmpl @@ -815,16 +815,15 @@ variable "gce_pd_csi_driver" { default = true } -{% endif %} -variable "gke_backup_agent_config" { +variable "gcs_fuse_csi_driver" { type = bool - description = "Whether Backup for GKE agent is enabled for this cluster." + description = "Whether GCE FUSE CSI driver is enabled for this cluster." default = false } - -variable "gcs_fuse_csi_driver" { +{% endif %} +variable "gke_backup_agent_config" { type = bool - description = "Whether GCE FUSE CSI driver is enabled for this cluster." + description = "Whether Backup for GKE agent is enabled for this cluster." default = false } diff --git a/cluster.tf b/cluster.tf index c9bfee5c8f..7565c09ecb 100644 --- a/cluster.tf +++ b/cluster.tf @@ -269,19 +269,19 @@ resource "google_container_cluster" "primary" { enabled = var.config_connector } - dynamic "gke_backup_agent_config" { - for_each = local.gke_backup_agent_config + dynamic "gcs_fuse_csi_driver_config" { + for_each = local.gcs_fuse_csi_driver_config content { - enabled = gke_backup_agent_config.value.enabled + enabled = gcs_fuse_csi_driver_config.value.enabled } } - dynamic "gcs_fuse_csi_driver_config" { - for_each = local.gcs_fuse_csi_driver_config + dynamic "gke_backup_agent_config" { + for_each = local.gke_backup_agent_config content { - enabled = gcs_fuse_csi_driver_config.value.enabled + enabled = gke_backup_agent_config.value.enabled } } diff --git a/examples/simple_autopilot_public/main.tf b/examples/simple_autopilot_public/main.tf index 393b5de297..46376bbffa 100644 --- a/examples/simple_autopilot_public/main.tf +++ b/examples/simple_autopilot_public/main.tf @@ -49,7 +49,6 @@ module "gke" { network_tags = [local.cluster_type] deletion_protection = false enable_l4_ilb_subsetting = true - gcs_fuse_csi_driver = true stateful_ha = false gke_backup_agent_config = false ray_operator_config = { diff --git a/main.tf b/main.tf index 5a3caac731..a5c03c9281 100644 --- a/main.tf +++ b/main.tf @@ -90,8 +90,8 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] diff --git a/modules/beta-autopilot-private-cluster/README.md b/modules/beta-autopilot-private-cluster/README.md index ae2f7c6c60..acd8f48d86 100644 --- a/modules/beta-autopilot-private-cluster/README.md +++ b/modules/beta-autopilot-private-cluster/README.md @@ -108,7 +108,6 @@ Then perform the following commands on the root folder: | fleet\_project\_grant\_service\_agent | (Optional) Grant the fleet project service identity the `roles/gkehub.serviceAgent` and `roles/gkehub.crossProjectServiceAgent` roles. | `bool` | `false` | no | | gateway\_api\_channel | The gateway api channel of this cluster. Accepted values are `CHANNEL_STANDARD` and `CHANNEL_DISABLED`. | `string` | `null` | no | | gcp\_public\_cidrs\_access\_enabled | Allow access through Google Cloud public IP addresses | `bool` | `null` | no | -| gcs\_fuse\_csi\_driver | Whether GCE FUSE CSI driver is enabled for this cluster. | `bool` | `false` | no | | gke\_backup\_agent\_config | Whether Backup for GKE agent is enabled for this cluster. | `bool` | `false` | no | | grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer and artifactregistry.reader roles. | `bool` | `false` | no | | horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | `bool` | `true` | no | diff --git a/modules/beta-autopilot-private-cluster/cluster.tf b/modules/beta-autopilot-private-cluster/cluster.tf index bddef25b74..9b2c8059c2 100644 --- a/modules/beta-autopilot-private-cluster/cluster.tf +++ b/modules/beta-autopilot-private-cluster/cluster.tf @@ -178,14 +178,6 @@ resource "google_container_cluster" "primary" { } } - dynamic "gcs_fuse_csi_driver_config" { - for_each = local.gcs_fuse_csi_driver_config - - content { - enabled = gcs_fuse_csi_driver_config.value.enabled - } - } - dynamic "stateful_ha_config" { for_each = local.stateful_ha_config diff --git a/modules/beta-autopilot-private-cluster/main.tf b/modules/beta-autopilot-private-cluster/main.tf index e2bd8547a3..2fa6a05453 100644 --- a/modules/beta-autopilot-private-cluster/main.tf +++ b/modules/beta-autopilot-private-cluster/main.tf @@ -64,10 +64,9 @@ locals { cluster_alias_ranges_cidr = var.add_cluster_firewall_rules ? { for range in toset(data.google_compute_subnetwork.gke_subnetwork[0].secondary_ip_range) : range.range_name => range.ip_cidr_range } : {} pod_all_ip_ranges = var.add_cluster_firewall_rules ? compact(concat([local.cluster_alias_ranges_cidr[var.ip_range_pods]], [for range in var.additional_ip_range_pods : local.cluster_alias_ranges_cidr[range] if length(range) > 0])) : [] - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] - stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] + stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] + ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{ security_group = var.authenticator_security_group diff --git a/modules/beta-autopilot-private-cluster/variables.tf b/modules/beta-autopilot-private-cluster/variables.tf index 813d42b716..1673498087 100644 --- a/modules/beta-autopilot-private-cluster/variables.tf +++ b/modules/beta-autopilot-private-cluster/variables.tf @@ -489,12 +489,6 @@ variable "gke_backup_agent_config" { default = false } -variable "gcs_fuse_csi_driver" { - type = bool - description = "Whether GCE FUSE CSI driver is enabled for this cluster." - default = false -} - variable "stateful_ha" { type = bool description = "Whether the Stateful HA Addon is enabled for this cluster." diff --git a/modules/beta-autopilot-public-cluster/README.md b/modules/beta-autopilot-public-cluster/README.md index b8f13d4e01..d2bc7c0806 100644 --- a/modules/beta-autopilot-public-cluster/README.md +++ b/modules/beta-autopilot-public-cluster/README.md @@ -100,7 +100,6 @@ Then perform the following commands on the root folder: | fleet\_project\_grant\_service\_agent | (Optional) Grant the fleet project service identity the `roles/gkehub.serviceAgent` and `roles/gkehub.crossProjectServiceAgent` roles. | `bool` | `false` | no | | gateway\_api\_channel | The gateway api channel of this cluster. Accepted values are `CHANNEL_STANDARD` and `CHANNEL_DISABLED`. | `string` | `null` | no | | gcp\_public\_cidrs\_access\_enabled | Allow access through Google Cloud public IP addresses | `bool` | `null` | no | -| gcs\_fuse\_csi\_driver | Whether GCE FUSE CSI driver is enabled for this cluster. | `bool` | `false` | no | | gke\_backup\_agent\_config | Whether Backup for GKE agent is enabled for this cluster. | `bool` | `false` | no | | grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer and artifactregistry.reader roles. | `bool` | `false` | no | | horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | `bool` | `true` | no | diff --git a/modules/beta-autopilot-public-cluster/cluster.tf b/modules/beta-autopilot-public-cluster/cluster.tf index 4baca3ecac..92d0eeb2f9 100644 --- a/modules/beta-autopilot-public-cluster/cluster.tf +++ b/modules/beta-autopilot-public-cluster/cluster.tf @@ -178,14 +178,6 @@ resource "google_container_cluster" "primary" { } } - dynamic "gcs_fuse_csi_driver_config" { - for_each = local.gcs_fuse_csi_driver_config - - content { - enabled = gcs_fuse_csi_driver_config.value.enabled - } - } - dynamic "stateful_ha_config" { for_each = local.stateful_ha_config diff --git a/modules/beta-autopilot-public-cluster/main.tf b/modules/beta-autopilot-public-cluster/main.tf index 5f2e7f7421..a665591fd6 100644 --- a/modules/beta-autopilot-public-cluster/main.tf +++ b/modules/beta-autopilot-public-cluster/main.tf @@ -64,10 +64,9 @@ locals { cluster_alias_ranges_cidr = var.add_cluster_firewall_rules ? { for range in toset(data.google_compute_subnetwork.gke_subnetwork[0].secondary_ip_range) : range.range_name => range.ip_cidr_range } : {} pod_all_ip_ranges = var.add_cluster_firewall_rules ? compact(concat([local.cluster_alias_ranges_cidr[var.ip_range_pods]], [for range in var.additional_ip_range_pods : local.cluster_alias_ranges_cidr[range] if length(range) > 0])) : [] - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] - stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] + stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] + ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{ security_group = var.authenticator_security_group diff --git a/modules/beta-autopilot-public-cluster/variables.tf b/modules/beta-autopilot-public-cluster/variables.tf index f212deff44..ed82dc3f09 100644 --- a/modules/beta-autopilot-public-cluster/variables.tf +++ b/modules/beta-autopilot-public-cluster/variables.tf @@ -453,12 +453,6 @@ variable "gke_backup_agent_config" { default = false } -variable "gcs_fuse_csi_driver" { - type = bool - description = "Whether GCE FUSE CSI driver is enabled for this cluster." - default = false -} - variable "stateful_ha" { type = bool description = "Whether the Stateful HA Addon is enabled for this cluster." diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index f86cd27458..fdb0a70bc1 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -282,19 +282,19 @@ resource "google_container_cluster" "primary" { enabled = var.config_connector } - dynamic "gke_backup_agent_config" { - for_each = local.gke_backup_agent_config + dynamic "gcs_fuse_csi_driver_config" { + for_each = local.gcs_fuse_csi_driver_config content { - enabled = gke_backup_agent_config.value.enabled + enabled = gcs_fuse_csi_driver_config.value.enabled } } - dynamic "gcs_fuse_csi_driver_config" { - for_each = local.gcs_fuse_csi_driver_config + dynamic "gke_backup_agent_config" { + for_each = local.gke_backup_agent_config content { - enabled = gcs_fuse_csi_driver_config.value.enabled + enabled = gke_backup_agent_config.value.enabled } } diff --git a/modules/beta-private-cluster-update-variant/main.tf b/modules/beta-private-cluster-update-variant/main.tf index c573681b7b..4131a493f6 100644 --- a/modules/beta-private-cluster-update-variant/main.tf +++ b/modules/beta-private-cluster-update-variant/main.tf @@ -90,8 +90,8 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? { diff --git a/modules/beta-private-cluster-update-variant/variables.tf b/modules/beta-private-cluster-update-variant/variables.tf index 8c2e2de46c..160af23f15 100644 --- a/modules/beta-private-cluster-update-variant/variables.tf +++ b/modules/beta-private-cluster-update-variant/variables.tf @@ -777,15 +777,14 @@ variable "gce_pd_csi_driver" { default = true } -variable "gke_backup_agent_config" { +variable "gcs_fuse_csi_driver" { type = bool - description = "Whether Backup for GKE agent is enabled for this cluster." + description = "Whether GCE FUSE CSI driver is enabled for this cluster." default = false } - -variable "gcs_fuse_csi_driver" { +variable "gke_backup_agent_config" { type = bool - description = "Whether GCE FUSE CSI driver is enabled for this cluster." + description = "Whether Backup for GKE agent is enabled for this cluster." default = false } diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index 2a2362e60d..d90364d1f6 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -282,19 +282,19 @@ resource "google_container_cluster" "primary" { enabled = var.config_connector } - dynamic "gke_backup_agent_config" { - for_each = local.gke_backup_agent_config + dynamic "gcs_fuse_csi_driver_config" { + for_each = local.gcs_fuse_csi_driver_config content { - enabled = gke_backup_agent_config.value.enabled + enabled = gcs_fuse_csi_driver_config.value.enabled } } - dynamic "gcs_fuse_csi_driver_config" { - for_each = local.gcs_fuse_csi_driver_config + dynamic "gke_backup_agent_config" { + for_each = local.gke_backup_agent_config content { - enabled = gcs_fuse_csi_driver_config.value.enabled + enabled = gke_backup_agent_config.value.enabled } } diff --git a/modules/beta-private-cluster/main.tf b/modules/beta-private-cluster/main.tf index c573681b7b..4131a493f6 100644 --- a/modules/beta-private-cluster/main.tf +++ b/modules/beta-private-cluster/main.tf @@ -90,8 +90,8 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? { diff --git a/modules/beta-private-cluster/variables.tf b/modules/beta-private-cluster/variables.tf index 8c2e2de46c..160af23f15 100644 --- a/modules/beta-private-cluster/variables.tf +++ b/modules/beta-private-cluster/variables.tf @@ -777,15 +777,14 @@ variable "gce_pd_csi_driver" { default = true } -variable "gke_backup_agent_config" { +variable "gcs_fuse_csi_driver" { type = bool - description = "Whether Backup for GKE agent is enabled for this cluster." + description = "Whether GCE FUSE CSI driver is enabled for this cluster." default = false } - -variable "gcs_fuse_csi_driver" { +variable "gke_backup_agent_config" { type = bool - description = "Whether GCE FUSE CSI driver is enabled for this cluster." + description = "Whether Backup for GKE agent is enabled for this cluster." default = false } diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index 2fd7580755..560f44819b 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -282,19 +282,19 @@ resource "google_container_cluster" "primary" { enabled = var.config_connector } - dynamic "gke_backup_agent_config" { - for_each = local.gke_backup_agent_config + dynamic "gcs_fuse_csi_driver_config" { + for_each = local.gcs_fuse_csi_driver_config content { - enabled = gke_backup_agent_config.value.enabled + enabled = gcs_fuse_csi_driver_config.value.enabled } } - dynamic "gcs_fuse_csi_driver_config" { - for_each = local.gcs_fuse_csi_driver_config + dynamic "gke_backup_agent_config" { + for_each = local.gke_backup_agent_config content { - enabled = gcs_fuse_csi_driver_config.value.enabled + enabled = gke_backup_agent_config.value.enabled } } diff --git a/modules/beta-public-cluster-update-variant/main.tf b/modules/beta-public-cluster-update-variant/main.tf index a08408273d..a650684b74 100644 --- a/modules/beta-public-cluster-update-variant/main.tf +++ b/modules/beta-public-cluster-update-variant/main.tf @@ -90,8 +90,8 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? { diff --git a/modules/beta-public-cluster-update-variant/variables.tf b/modules/beta-public-cluster-update-variant/variables.tf index 2d5c215ddd..540e0fbad3 100644 --- a/modules/beta-public-cluster-update-variant/variables.tf +++ b/modules/beta-public-cluster-update-variant/variables.tf @@ -741,15 +741,14 @@ variable "gce_pd_csi_driver" { default = true } -variable "gke_backup_agent_config" { +variable "gcs_fuse_csi_driver" { type = bool - description = "Whether Backup for GKE agent is enabled for this cluster." + description = "Whether GCE FUSE CSI driver is enabled for this cluster." default = false } - -variable "gcs_fuse_csi_driver" { +variable "gke_backup_agent_config" { type = bool - description = "Whether GCE FUSE CSI driver is enabled for this cluster." + description = "Whether Backup for GKE agent is enabled for this cluster." default = false } diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index ae1d831ccb..fd14173522 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -282,19 +282,19 @@ resource "google_container_cluster" "primary" { enabled = var.config_connector } - dynamic "gke_backup_agent_config" { - for_each = local.gke_backup_agent_config + dynamic "gcs_fuse_csi_driver_config" { + for_each = local.gcs_fuse_csi_driver_config content { - enabled = gke_backup_agent_config.value.enabled + enabled = gcs_fuse_csi_driver_config.value.enabled } } - dynamic "gcs_fuse_csi_driver_config" { - for_each = local.gcs_fuse_csi_driver_config + dynamic "gke_backup_agent_config" { + for_each = local.gke_backup_agent_config content { - enabled = gcs_fuse_csi_driver_config.value.enabled + enabled = gke_backup_agent_config.value.enabled } } diff --git a/modules/beta-public-cluster/main.tf b/modules/beta-public-cluster/main.tf index a08408273d..a650684b74 100644 --- a/modules/beta-public-cluster/main.tf +++ b/modules/beta-public-cluster/main.tf @@ -90,8 +90,8 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? { diff --git a/modules/beta-public-cluster/variables.tf b/modules/beta-public-cluster/variables.tf index 2d5c215ddd..540e0fbad3 100644 --- a/modules/beta-public-cluster/variables.tf +++ b/modules/beta-public-cluster/variables.tf @@ -741,15 +741,14 @@ variable "gce_pd_csi_driver" { default = true } -variable "gke_backup_agent_config" { +variable "gcs_fuse_csi_driver" { type = bool - description = "Whether Backup for GKE agent is enabled for this cluster." + description = "Whether GCE FUSE CSI driver is enabled for this cluster." default = false } - -variable "gcs_fuse_csi_driver" { +variable "gke_backup_agent_config" { type = bool - description = "Whether GCE FUSE CSI driver is enabled for this cluster." + description = "Whether Backup for GKE agent is enabled for this cluster." default = false } diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index 32c17acbb4..9ce30198e0 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -269,19 +269,19 @@ resource "google_container_cluster" "primary" { enabled = var.config_connector } - dynamic "gke_backup_agent_config" { - for_each = local.gke_backup_agent_config + dynamic "gcs_fuse_csi_driver_config" { + for_each = local.gcs_fuse_csi_driver_config content { - enabled = gke_backup_agent_config.value.enabled + enabled = gcs_fuse_csi_driver_config.value.enabled } } - dynamic "gcs_fuse_csi_driver_config" { - for_each = local.gcs_fuse_csi_driver_config + dynamic "gke_backup_agent_config" { + for_each = local.gke_backup_agent_config content { - enabled = gcs_fuse_csi_driver_config.value.enabled + enabled = gke_backup_agent_config.value.enabled } } diff --git a/modules/private-cluster-update-variant/main.tf b/modules/private-cluster-update-variant/main.tf index dac248be86..d9e4598d9f 100644 --- a/modules/private-cluster-update-variant/main.tf +++ b/modules/private-cluster-update-variant/main.tf @@ -90,8 +90,8 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] diff --git a/modules/private-cluster-update-variant/variables.tf b/modules/private-cluster-update-variant/variables.tf index 012626838d..c691a887ac 100644 --- a/modules/private-cluster-update-variant/variables.tf +++ b/modules/private-cluster-update-variant/variables.tf @@ -759,15 +759,14 @@ variable "gce_pd_csi_driver" { default = true } -variable "gke_backup_agent_config" { +variable "gcs_fuse_csi_driver" { type = bool - description = "Whether Backup for GKE agent is enabled for this cluster." + description = "Whether GCE FUSE CSI driver is enabled for this cluster." default = false } - -variable "gcs_fuse_csi_driver" { +variable "gke_backup_agent_config" { type = bool - description = "Whether GCE FUSE CSI driver is enabled for this cluster." + description = "Whether Backup for GKE agent is enabled for this cluster." default = false } diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index 8e74d6bf12..2094613ff8 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -269,19 +269,19 @@ resource "google_container_cluster" "primary" { enabled = var.config_connector } - dynamic "gke_backup_agent_config" { - for_each = local.gke_backup_agent_config + dynamic "gcs_fuse_csi_driver_config" { + for_each = local.gcs_fuse_csi_driver_config content { - enabled = gke_backup_agent_config.value.enabled + enabled = gcs_fuse_csi_driver_config.value.enabled } } - dynamic "gcs_fuse_csi_driver_config" { - for_each = local.gcs_fuse_csi_driver_config + dynamic "gke_backup_agent_config" { + for_each = local.gke_backup_agent_config content { - enabled = gcs_fuse_csi_driver_config.value.enabled + enabled = gke_backup_agent_config.value.enabled } } diff --git a/modules/private-cluster/main.tf b/modules/private-cluster/main.tf index dac248be86..d9e4598d9f 100644 --- a/modules/private-cluster/main.tf +++ b/modules/private-cluster/main.tf @@ -90,8 +90,8 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] diff --git a/modules/private-cluster/variables.tf b/modules/private-cluster/variables.tf index 012626838d..c691a887ac 100644 --- a/modules/private-cluster/variables.tf +++ b/modules/private-cluster/variables.tf @@ -759,15 +759,14 @@ variable "gce_pd_csi_driver" { default = true } -variable "gke_backup_agent_config" { +variable "gcs_fuse_csi_driver" { type = bool - description = "Whether Backup for GKE agent is enabled for this cluster." + description = "Whether GCE FUSE CSI driver is enabled for this cluster." default = false } - -variable "gcs_fuse_csi_driver" { +variable "gke_backup_agent_config" { type = bool - description = "Whether GCE FUSE CSI driver is enabled for this cluster." + description = "Whether Backup for GKE agent is enabled for this cluster." default = false } diff --git a/variables.tf b/variables.tf index 86595638a2..989b8d89f9 100644 --- a/variables.tf +++ b/variables.tf @@ -723,15 +723,14 @@ variable "gce_pd_csi_driver" { default = true } -variable "gke_backup_agent_config" { +variable "gcs_fuse_csi_driver" { type = bool - description = "Whether Backup for GKE agent is enabled for this cluster." + description = "Whether GCE FUSE CSI driver is enabled for this cluster." default = false } - -variable "gcs_fuse_csi_driver" { +variable "gke_backup_agent_config" { type = bool - description = "Whether GCE FUSE CSI driver is enabled for this cluster." + description = "Whether Backup for GKE agent is enabled for this cluster." default = false }