Skip to content

Commit

Permalink
fix: ignore control plane network when private endpoint subnet is set (
Browse files Browse the repository at this point in the history
  • Loading branch information
wyardley authored Sep 27, 2024
1 parent 6e5559e commit a4b130d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ resource "google_container_cluster" "primary" {
content {
enable_private_endpoint = private_cluster_config.value.enable_private_endpoint
enable_private_nodes = private_cluster_config.value.enable_private_nodes
master_ipv4_cidr_block = private_cluster_config.value.master_ipv4_cidr_block
master_ipv4_cidr_block = var.private_endpoint_subnetwork == null ? private_cluster_config.value.master_ipv4_cidr_block : null
private_endpoint_subnetwork = private_cluster_config.value.private_endpoint_subnetwork
dynamic "master_global_access_config" {
for_each = var.master_global_access_enabled ? [var.master_global_access_enabled] : []
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 @@ -295,7 +295,7 @@ resource "google_container_cluster" "primary" {
content {
enable_private_endpoint = private_cluster_config.value.enable_private_endpoint
enable_private_nodes = private_cluster_config.value.enable_private_nodes
master_ipv4_cidr_block = private_cluster_config.value.master_ipv4_cidr_block
master_ipv4_cidr_block = var.private_endpoint_subnetwork == null ? private_cluster_config.value.master_ipv4_cidr_block : null
private_endpoint_subnetwork = private_cluster_config.value.private_endpoint_subnetwork
dynamic "master_global_access_config" {
for_each = var.master_global_access_enabled ? [var.master_global_access_enabled] : []
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 @@ -516,7 +516,7 @@ resource "google_container_cluster" "primary" {
content {
enable_private_endpoint = private_cluster_config.value.enable_private_endpoint
enable_private_nodes = private_cluster_config.value.enable_private_nodes
master_ipv4_cidr_block = private_cluster_config.value.master_ipv4_cidr_block
master_ipv4_cidr_block = var.private_endpoint_subnetwork == null ? private_cluster_config.value.master_ipv4_cidr_block : null
private_endpoint_subnetwork = private_cluster_config.value.private_endpoint_subnetwork
dynamic "master_global_access_config" {
for_each = var.master_global_access_enabled ? [var.master_global_access_enabled] : []
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 @@ -516,7 +516,7 @@ resource "google_container_cluster" "primary" {
content {
enable_private_endpoint = private_cluster_config.value.enable_private_endpoint
enable_private_nodes = private_cluster_config.value.enable_private_nodes
master_ipv4_cidr_block = private_cluster_config.value.master_ipv4_cidr_block
master_ipv4_cidr_block = var.private_endpoint_subnetwork == null ? private_cluster_config.value.master_ipv4_cidr_block : null
private_endpoint_subnetwork = private_cluster_config.value.private_endpoint_subnetwork
dynamic "master_global_access_config" {
for_each = var.master_global_access_enabled ? [var.master_global_access_enabled] : []
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 @@ -462,7 +462,7 @@ resource "google_container_cluster" "primary" {
content {
enable_private_endpoint = private_cluster_config.value.enable_private_endpoint
enable_private_nodes = private_cluster_config.value.enable_private_nodes
master_ipv4_cidr_block = private_cluster_config.value.master_ipv4_cidr_block
master_ipv4_cidr_block = var.private_endpoint_subnetwork == null ? private_cluster_config.value.master_ipv4_cidr_block : null
private_endpoint_subnetwork = private_cluster_config.value.private_endpoint_subnetwork
dynamic "master_global_access_config" {
for_each = var.master_global_access_enabled ? [var.master_global_access_enabled] : []
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 @@ -462,7 +462,7 @@ resource "google_container_cluster" "primary" {
content {
enable_private_endpoint = private_cluster_config.value.enable_private_endpoint
enable_private_nodes = private_cluster_config.value.enable_private_nodes
master_ipv4_cidr_block = private_cluster_config.value.master_ipv4_cidr_block
master_ipv4_cidr_block = var.private_endpoint_subnetwork == null ? private_cluster_config.value.master_ipv4_cidr_block : null
private_endpoint_subnetwork = private_cluster_config.value.private_endpoint_subnetwork
dynamic "master_global_access_config" {
for_each = var.master_global_access_enabled ? [var.master_global_access_enabled] : []
Expand Down

0 comments on commit a4b130d

Please sign in to comment.