diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index b493d04f7..4a0933305 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -493,7 +493,7 @@ resource "google_container_cluster" "primary" { {% if autopilot_cluster != true %} dynamic "dns_config" { - for_each = var.cluster_dns_provider == "CLOUD_DNS" ? [1] : [] + for_each = contains(["CLOUD_DNS", "PROVIDER_UNSPECIFIED", "PLATFORM_DEFAULT"], var.cluster_dns_provider) ? [1] : [] content { additive_vpc_scope_dns_domain = var.additive_vpc_scope_dns_domain cluster_dns = var.cluster_dns_provider diff --git a/cluster.tf b/cluster.tf index d53799e50..9d8563288 100644 --- a/cluster.tf +++ b/cluster.tf @@ -376,7 +376,7 @@ resource "google_container_cluster" "primary" { } dynamic "dns_config" { - for_each = var.cluster_dns_provider == "CLOUD_DNS" ? [1] : [] + for_each = contains(["CLOUD_DNS", "PROVIDER_UNSPECIFIED", "PLATFORM_DEFAULT"], var.cluster_dns_provider) ? [1] : [] content { additive_vpc_scope_dns_domain = var.additive_vpc_scope_dns_domain cluster_dns = var.cluster_dns_provider diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index d4f320e36..e921f9fb8 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -414,7 +414,7 @@ resource "google_container_cluster" "primary" { } dynamic "dns_config" { - for_each = var.cluster_dns_provider == "CLOUD_DNS" ? [1] : [] + for_each = contains(["CLOUD_DNS", "PROVIDER_UNSPECIFIED", "PLATFORM_DEFAULT"], var.cluster_dns_provider) ? [1] : [] content { additive_vpc_scope_dns_domain = var.additive_vpc_scope_dns_domain cluster_dns = var.cluster_dns_provider diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index 29f11bb7e..fc4653e77 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -414,7 +414,7 @@ resource "google_container_cluster" "primary" { } dynamic "dns_config" { - for_each = var.cluster_dns_provider == "CLOUD_DNS" ? [1] : [] + for_each = contains(["CLOUD_DNS", "PROVIDER_UNSPECIFIED", "PLATFORM_DEFAULT"], var.cluster_dns_provider) ? [1] : [] content { additive_vpc_scope_dns_domain = var.additive_vpc_scope_dns_domain cluster_dns = var.cluster_dns_provider diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index b20fa7483..b170209e5 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -414,7 +414,7 @@ resource "google_container_cluster" "primary" { } dynamic "dns_config" { - for_each = var.cluster_dns_provider == "CLOUD_DNS" ? [1] : [] + for_each = contains(["CLOUD_DNS", "PROVIDER_UNSPECIFIED", "PLATFORM_DEFAULT"], var.cluster_dns_provider) ? [1] : [] content { additive_vpc_scope_dns_domain = var.additive_vpc_scope_dns_domain cluster_dns = var.cluster_dns_provider diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index d76574eb3..e64a1efd5 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -414,7 +414,7 @@ resource "google_container_cluster" "primary" { } dynamic "dns_config" { - for_each = var.cluster_dns_provider == "CLOUD_DNS" ? [1] : [] + for_each = contains(["CLOUD_DNS", "PROVIDER_UNSPECIFIED", "PLATFORM_DEFAULT"], var.cluster_dns_provider) ? [1] : [] content { additive_vpc_scope_dns_domain = var.additive_vpc_scope_dns_domain cluster_dns = var.cluster_dns_provider diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index fa03099a0..53a3dc7a7 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -376,7 +376,7 @@ resource "google_container_cluster" "primary" { } dynamic "dns_config" { - for_each = var.cluster_dns_provider == "CLOUD_DNS" ? [1] : [] + for_each = contains(["CLOUD_DNS", "PROVIDER_UNSPECIFIED", "PLATFORM_DEFAULT"], var.cluster_dns_provider) ? [1] : [] content { additive_vpc_scope_dns_domain = var.additive_vpc_scope_dns_domain cluster_dns = var.cluster_dns_provider diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index 3ca8117ae..486d16ab0 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -376,7 +376,7 @@ resource "google_container_cluster" "primary" { } dynamic "dns_config" { - for_each = var.cluster_dns_provider == "CLOUD_DNS" ? [1] : [] + for_each = contains(["CLOUD_DNS", "PROVIDER_UNSPECIFIED", "PLATFORM_DEFAULT"], var.cluster_dns_provider) ? [1] : [] content { additive_vpc_scope_dns_domain = var.additive_vpc_scope_dns_domain cluster_dns = var.cluster_dns_provider