diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index 68476199f5..3efe9f97c7 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -659,7 +659,8 @@ resource "google_container_node_pool" "windows_pools" { dynamic "network_config" { for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : [] content { - pod_range = lookup(network_config.value, "pod_range", null) + pod_range = lookup(network_config.value, "pod_range", null) + enable_private_nodes = var.enable_private_nodes } } {% endif %} diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index e9cbce1917..8f98fedb4a 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -568,7 +568,8 @@ resource "google_container_node_pool" "pools" { dynamic "network_config" { for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : [] content { - pod_range = lookup(network_config.value, "pod_range", null) + pod_range = lookup(network_config.value, "pod_range", null) + enable_private_nodes = var.enable_private_nodes } } @@ -779,7 +780,8 @@ resource "google_container_node_pool" "windows_pools" { dynamic "network_config" { for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : [] content { - pod_range = lookup(network_config.value, "pod_range", null) + pod_range = lookup(network_config.value, "pod_range", null) + enable_private_nodes = var.enable_private_nodes } } diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index 0040d5d9bf..b1595e98cc 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -474,7 +474,8 @@ resource "google_container_node_pool" "pools" { dynamic "network_config" { for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : [] content { - pod_range = lookup(network_config.value, "pod_range", null) + pod_range = lookup(network_config.value, "pod_range", null) + enable_private_nodes = var.enable_private_nodes } } @@ -684,7 +685,8 @@ resource "google_container_node_pool" "windows_pools" { dynamic "network_config" { for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : [] content { - pod_range = lookup(network_config.value, "pod_range", null) + pod_range = lookup(network_config.value, "pod_range", null) + enable_private_nodes = var.enable_private_nodes } } diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index 09938b2cb2..fd3bf25a35 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -549,7 +549,8 @@ resource "google_container_node_pool" "pools" { dynamic "network_config" { for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : [] content { - pod_range = lookup(network_config.value, "pod_range", null) + pod_range = lookup(network_config.value, "pod_range", null) + enable_private_nodes = var.enable_private_nodes } } @@ -760,7 +761,8 @@ resource "google_container_node_pool" "windows_pools" { dynamic "network_config" { for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : [] content { - pod_range = lookup(network_config.value, "pod_range", null) + pod_range = lookup(network_config.value, "pod_range", null) + enable_private_nodes = var.enable_private_nodes } } diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index 8ced172253..514b006525 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -455,7 +455,8 @@ resource "google_container_node_pool" "pools" { dynamic "network_config" { for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : [] content { - pod_range = lookup(network_config.value, "pod_range", null) + pod_range = lookup(network_config.value, "pod_range", null) + enable_private_nodes = var.enable_private_nodes } } @@ -665,7 +666,8 @@ resource "google_container_node_pool" "windows_pools" { dynamic "network_config" { for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : [] content { - pod_range = lookup(network_config.value, "pod_range", null) + pod_range = lookup(network_config.value, "pod_range", null) + enable_private_nodes = var.enable_private_nodes } }