diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index 4423f2d694..52d6ef05d2 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -516,7 +516,7 @@ resource "google_container_cluster" "primary" { min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "") enable_confidential_storage = lookup(var.node_pools[0], "enable_confidential_storage", false) dynamic "gcfs_config" { - for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0]] : [] + for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0].enable_gcfs] : [] content { enabled = gcfs_config.value } diff --git a/cluster.tf b/cluster.tf index 9304059307..27cd0cebb0 100644 --- a/cluster.tf +++ b/cluster.tf @@ -393,7 +393,7 @@ resource "google_container_cluster" "primary" { min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "") enable_confidential_storage = lookup(var.node_pools[0], "enable_confidential_storage", false) dynamic "gcfs_config" { - for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0]] : [] + for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0].enable_gcfs] : [] content { enabled = gcfs_config.value } diff --git a/examples/node_pool/main.tf b/examples/node_pool/main.tf index 0d1c6ab981..6d61682f5b 100644 --- a/examples/node_pool/main.tf +++ b/examples/node_pool/main.tf @@ -51,6 +51,7 @@ module "gke" { max_count = 2 service_account = var.compute_engine_service_account auto_upgrade = true + enable_gcfs = false }, { name = "pool-02" diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index ff77b6211f..7f6916b96e 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -439,7 +439,7 @@ resource "google_container_cluster" "primary" { min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "") enable_confidential_storage = lookup(var.node_pools[0], "enable_confidential_storage", false) dynamic "gcfs_config" { - for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0]] : [] + for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0].enable_gcfs] : [] content { enabled = gcfs_config.value } diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index a514da0e14..ef77e7808d 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -439,7 +439,7 @@ resource "google_container_cluster" "primary" { min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "") enable_confidential_storage = lookup(var.node_pools[0], "enable_confidential_storage", false) dynamic "gcfs_config" { - for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0]] : [] + for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0].enable_gcfs] : [] content { enabled = gcfs_config.value } diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index 98c1685321..bafcacdd12 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -439,7 +439,7 @@ resource "google_container_cluster" "primary" { min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "") enable_confidential_storage = lookup(var.node_pools[0], "enable_confidential_storage", false) dynamic "gcfs_config" { - for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0]] : [] + for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0].enable_gcfs] : [] content { enabled = gcfs_config.value } diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index 1010467a93..2c362c4263 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -439,7 +439,7 @@ resource "google_container_cluster" "primary" { min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "") enable_confidential_storage = lookup(var.node_pools[0], "enable_confidential_storage", false) dynamic "gcfs_config" { - for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0]] : [] + for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0].enable_gcfs] : [] content { enabled = gcfs_config.value } diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index 228b1ed12f..e3a1a52263 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -393,7 +393,7 @@ resource "google_container_cluster" "primary" { min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "") enable_confidential_storage = lookup(var.node_pools[0], "enable_confidential_storage", false) dynamic "gcfs_config" { - for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0]] : [] + for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0].enable_gcfs] : [] content { enabled = gcfs_config.value } diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index a6079069c2..c6cf074c54 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -393,7 +393,7 @@ resource "google_container_cluster" "primary" { min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "") enable_confidential_storage = lookup(var.node_pools[0], "enable_confidential_storage", false) dynamic "gcfs_config" { - for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0]] : [] + for_each = lookup(var.node_pools[0], "enable_gcfs", null) != null ? [var.node_pools[0].enable_gcfs] : [] content { enabled = gcfs_config.value }