Skip to content

Commit d27ca16

Browse files
author
Andras Gyömrey
committed
local.region is derived from the zone when var.region is not available (zonal cluster).
1 parent 92c4ff2 commit d27ca16

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ resource "google_container_cluster" "primary" {
4242
}
4343

4444

45-
subnetwork = "projects/${local.network_project_id}/regions/${var.region}/subnetworks/${var.subnetwork}"
45+
subnetwork = "projects/${local.network_project_id}/regions/${local.region}/subnetworks/${var.subnetwork}"
4646

4747
min_master_version = local.master_version
4848

test/fixtures/simple_zonal/example.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ module "example" {
1919

2020
project_id = var.project_ids[1]
2121
cluster_name_suffix = "-${random_string.suffix.result}"
22-
region = var.region
2322
zones = slice(var.zones, 0, 1)
2423
network = google_compute_network.main.name
2524
subnetwork = google_compute_subnetwork.main.name

test/fixtures/simple_zonal_private/example.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ module "example" {
1919

2020
project_id = var.project_ids[1]
2121
cluster_name_suffix = "-${random_string.suffix.result}"
22-
region = var.region
2322
zones = slice(var.zones, 0, 1)
2423
network = google_compute_network.main.name
2524
subnetwork = google_compute_subnetwork.main.name

0 commit comments

Comments
 (0)