Skip to content

Commit

Permalink
Fix: dns endpoint for external traffic (#2244)
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Morejon <[email protected]>
  • Loading branch information
mmorejon authored Jan 24, 2025
1 parent 47a49ac commit 4726ab2
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ resource "google_container_cluster" "primary" {
}

dynamic "control_plane_endpoints_config" {
for_each = var.enable_private_endpoint && var.deploy_using_private_endpoint ? [1] : [0]
for_each = var.enable_private_endpoint && var.deploy_using_private_endpoint ? [1] : []
content {
dns_endpoint_config {
allow_external_traffic = var.deploy_using_private_endpoint
Expand Down
2 changes: 1 addition & 1 deletion examples/safer_cluster_iap_bastion/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module "gke" {
subnetwork = module.vpc.subnets_names[0]
ip_range_pods = module.vpc.subnets_secondary_ranges[0][0].range_name
ip_range_services = module.vpc.subnets_secondary_ranges[0][1].range_name
enable_private_endpoint = false
enable_private_endpoint = true
deletion_protection = false
master_authorized_networks = [{
cidr_block = "${module.bastion.ip_address}/32"
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-autopilot-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ resource "google_container_cluster" "primary" {
}

dynamic "control_plane_endpoints_config" {
for_each = var.enable_private_endpoint && var.deploy_using_private_endpoint ? [1] : [0]
for_each = var.enable_private_endpoint && var.deploy_using_private_endpoint ? [1] : []
content {
dns_endpoint_config {
allow_external_traffic = var.deploy_using_private_endpoint
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ resource "google_container_cluster" "primary" {
}

dynamic "control_plane_endpoints_config" {
for_each = var.enable_private_endpoint && var.deploy_using_private_endpoint ? [1] : [0]
for_each = var.enable_private_endpoint && var.deploy_using_private_endpoint ? [1] : []
content {
dns_endpoint_config {
allow_external_traffic = var.deploy_using_private_endpoint
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ resource "google_container_cluster" "primary" {
}

dynamic "control_plane_endpoints_config" {
for_each = var.enable_private_endpoint && var.deploy_using_private_endpoint ? [1] : [0]
for_each = var.enable_private_endpoint && var.deploy_using_private_endpoint ? [1] : []
content {
dns_endpoint_config {
allow_external_traffic = var.deploy_using_private_endpoint
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ resource "google_container_cluster" "primary" {
}

dynamic "control_plane_endpoints_config" {
for_each = var.enable_private_endpoint && var.deploy_using_private_endpoint ? [1] : [0]
for_each = var.enable_private_endpoint && var.deploy_using_private_endpoint ? [1] : []
content {
dns_endpoint_config {
allow_external_traffic = var.deploy_using_private_endpoint
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ resource "google_container_cluster" "primary" {
}

dynamic "control_plane_endpoints_config" {
for_each = var.enable_private_endpoint && var.deploy_using_private_endpoint ? [1] : [0]
for_each = var.enable_private_endpoint && var.deploy_using_private_endpoint ? [1] : []
content {
dns_endpoint_config {
allow_external_traffic = var.deploy_using_private_endpoint
Expand Down

0 comments on commit 4726ab2

Please sign in to comment.