Skip to content

Commit 3945205

Browse files
authored
Merge pull request #327 from terraform-google-modules/bugfix/node_locations
Don't attempt to set node_locations on pools if unspecified
2 parents 8dfd27b + efa4b61 commit 3945205

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

autogen/cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ resource "google_container_node_pool" "pools" {
312312
location = local.location
313313
{% if beta_cluster %}
314314
// use node_locations if provided, defaults to cluster level node_locations if not specified
315-
node_locations = lookup(var.node_pools[count.index], "node_locations", "") != "" ? split(",", var.node_pools[count.index]["node_locations"]) : google_container_cluster.primary.node_locations
315+
node_locations = lookup(var.node_pools[count.index], "node_locations", "") != "" ? split(",", var.node_pools[count.index]["node_locations"]) : null
316316
{% endif %}
317317
cluster = google_container_cluster.primary.name
318318
version = lookup(var.node_pools[count.index], "auto_upgrade", false) ? "" : lookup(

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ resource "google_container_node_pool" "pools" {
285285
project = var.project_id
286286
location = local.location
287287
// use node_locations if provided, defaults to cluster level node_locations if not specified
288-
node_locations = lookup(var.node_pools[count.index], "node_locations", "") != "" ? split(",", var.node_pools[count.index]["node_locations"]) : google_container_cluster.primary.node_locations
288+
node_locations = lookup(var.node_pools[count.index], "node_locations", "") != "" ? split(",", var.node_pools[count.index]["node_locations"]) : null
289289
cluster = google_container_cluster.primary.name
290290
version = lookup(var.node_pools[count.index], "auto_upgrade", false) ? "" : lookup(
291291
var.node_pools[count.index],

modules/beta-private-cluster/cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ resource "google_container_node_pool" "pools" {
213213
project = var.project_id
214214
location = local.location
215215
// use node_locations if provided, defaults to cluster level node_locations if not specified
216-
node_locations = lookup(var.node_pools[count.index], "node_locations", "") != "" ? split(",", var.node_pools[count.index]["node_locations"]) : google_container_cluster.primary.node_locations
216+
node_locations = lookup(var.node_pools[count.index], "node_locations", "") != "" ? split(",", var.node_pools[count.index]["node_locations"]) : null
217217
cluster = google_container_cluster.primary.name
218218
version = lookup(var.node_pools[count.index], "auto_upgrade", false) ? "" : lookup(
219219
var.node_pools[count.index],

modules/beta-public-cluster/cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ resource "google_container_node_pool" "pools" {
208208
project = var.project_id
209209
location = local.location
210210
// use node_locations if provided, defaults to cluster level node_locations if not specified
211-
node_locations = lookup(var.node_pools[count.index], "node_locations", "") != "" ? split(",", var.node_pools[count.index]["node_locations"]) : google_container_cluster.primary.node_locations
211+
node_locations = lookup(var.node_pools[count.index], "node_locations", "") != "" ? split(",", var.node_pools[count.index]["node_locations"]) : null
212212
cluster = google_container_cluster.primary.name
213213
version = lookup(var.node_pools[count.index], "auto_upgrade", false) ? "" : lookup(
214214
var.node_pools[count.index],

0 commit comments

Comments
 (0)