diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index bd9ed494ff..065a6e809e 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -601,7 +601,6 @@ resource "google_container_cluster" "primary" { } } - {% if autopilot_cluster != true %} dynamic "workload_identity_config" { for_each = local.cluster_workload_identity_config @@ -609,7 +608,6 @@ resource "google_container_cluster" "primary" { workload_pool = workload_identity_config.value.workload_pool } } - {% endif %} {% if autopilot_cluster != true %} dynamic "mesh_certificates" { diff --git a/modules/beta-autopilot-private-cluster/cluster.tf b/modules/beta-autopilot-private-cluster/cluster.tf index dde13721b3..e31caa28ff 100644 --- a/modules/beta-autopilot-private-cluster/cluster.tf +++ b/modules/beta-autopilot-private-cluster/cluster.tf @@ -290,6 +290,13 @@ resource "google_container_cluster" "primary" { } } + dynamic "workload_identity_config" { + for_each = local.cluster_workload_identity_config + + content { + workload_pool = workload_identity_config.value.workload_pool + } + } dynamic "authenticator_groups_config" { diff --git a/modules/beta-autopilot-public-cluster/cluster.tf b/modules/beta-autopilot-public-cluster/cluster.tf index b94e730990..63b92d253e 100644 --- a/modules/beta-autopilot-public-cluster/cluster.tf +++ b/modules/beta-autopilot-public-cluster/cluster.tf @@ -271,6 +271,13 @@ resource "google_container_cluster" "primary" { } } + dynamic "workload_identity_config" { + for_each = local.cluster_workload_identity_config + + content { + workload_pool = workload_identity_config.value.workload_pool + } + } dynamic "authenticator_groups_config" {