Skip to content

Commit 3ecf473

Browse files
authored
fix(private-cluster): master_ipv4_cidr_block on enable_private_nodes (#2250)
1 parent 35ead26 commit 3ecf473

File tree

7 files changed

+6
-9
lines changed

7 files changed

+6
-9
lines changed

autogen/main/outputs.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ output "mesh_certificates_config" {
207207

208208
output "master_ipv4_cidr_block" {
209209
description = "The IP range in CIDR notation used for the hosted master network"
210-
value = google_container_cluster.primary.private_cluster_config[0].master_ipv4_cidr_block
210+
value = var.enable_private_nodes ? google_container_cluster.primary.private_cluster_config[0].master_ipv4_cidr_block : null
211211
}
212212

213213
output "peering_name" {

modules/beta-autopilot-private-cluster/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ output "tpu_ipv4_cidr_block" {
165165

166166
output "master_ipv4_cidr_block" {
167167
description = "The IP range in CIDR notation used for the hosted master network"
168-
value = google_container_cluster.primary.private_cluster_config[0].master_ipv4_cidr_block
168+
value = var.enable_private_nodes ? google_container_cluster.primary.private_cluster_config[0].master_ipv4_cidr_block : null
169169
}
170170

171171
output "peering_name" {

modules/beta-private-cluster-update-variant/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ output "mesh_certificates_config" {
192192

193193
output "master_ipv4_cidr_block" {
194194
description = "The IP range in CIDR notation used for the hosted master network"
195-
value = google_container_cluster.primary.private_cluster_config[0].master_ipv4_cidr_block
195+
value = var.enable_private_nodes ? google_container_cluster.primary.private_cluster_config[0].master_ipv4_cidr_block : null
196196
}
197197

198198
output "peering_name" {

modules/beta-private-cluster/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ output "mesh_certificates_config" {
192192

193193
output "master_ipv4_cidr_block" {
194194
description = "The IP range in CIDR notation used for the hosted master network"
195-
value = google_container_cluster.primary.private_cluster_config[0].master_ipv4_cidr_block
195+
value = var.enable_private_nodes ? google_container_cluster.primary.private_cluster_config[0].master_ipv4_cidr_block : null
196196
}
197197

198198
output "peering_name" {

modules/private-cluster-update-variant/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ output "mesh_certificates_config" {
192192

193193
output "master_ipv4_cidr_block" {
194194
description = "The IP range in CIDR notation used for the hosted master network"
195-
value = google_container_cluster.primary.private_cluster_config[0].master_ipv4_cidr_block
195+
value = var.enable_private_nodes ? google_container_cluster.primary.private_cluster_config[0].master_ipv4_cidr_block : null
196196
}
197197

198198
output "peering_name" {

modules/private-cluster/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ output "mesh_certificates_config" {
192192

193193
output "master_ipv4_cidr_block" {
194194
description = "The IP range in CIDR notation used for the hosted master network"
195-
value = google_container_cluster.primary.private_cluster_config[0].master_ipv4_cidr_block
195+
value = var.enable_private_nodes ? google_container_cluster.primary.private_cluster_config[0].master_ipv4_cidr_block : null
196196
}
197197

198198
output "peering_name" {

test/integration/simple_regional_with_gateway_api/testdata/TestSimpleRegionalWithGatewayAPI.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,6 @@
200200
"mode": "GKE_METADATA"
201201
}
202202
},
203-
"locations": [
204-
"us-central1-a"
205-
],
206203
"management": {
207204
"autoRepair": true,
208205
"autoUpgrade": true

0 commit comments

Comments
 (0)