From 26a7f05a929ae01c78352026bc64cea2d14e2a00 Mon Sep 17 00:00:00 2001 From: Philipp Strube Date: Tue, 17 Aug 2021 19:18:49 +0200 Subject: [PATCH] Allow having a node pool's node locations differ from the cluster --- google/_modules/gke/node_pool/main.tf | 2 ++ google/_modules/gke/node_pool/variables.tf | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/google/_modules/gke/node_pool/main.tf b/google/_modules/gke/node_pool/main.tf index 7ff654fb..631025d7 100644 --- a/google/_modules/gke/node_pool/main.tf +++ b/google/_modules/gke/node_pool/main.tf @@ -11,6 +11,8 @@ resource "google_container_node_pool" "current" { max_node_count = var.max_node_count } + node_locations = var.node_locations + # # # Node config diff --git a/google/_modules/gke/node_pool/variables.tf b/google/_modules/gke/node_pool/variables.tf index 7b272946..4e2cbb0f 100644 --- a/google/_modules/gke/node_pool/variables.tf +++ b/google/_modules/gke/node_pool/variables.tf @@ -107,3 +107,9 @@ variable "taint" { type = list(any) default = [] } + +variable "node_locations" { + type = list(string) + description = "List of zones in the cluster's region to start worker nodes in. Defaults to cluster's node locations." + default = null +}