From 6a5b808b1795fd0f4e257be41e6935b6767dd0ba Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Tue, 8 Oct 2024 21:25:06 -0700 Subject: [PATCH] Add region to gcp instance template resource * Configure the regional worker instance templates with the region of the cluster. This defaults to the provider's region which isn't always what you want and if left off causes an error * Close #1512 --- CHANGES.md | 3 +++ google-cloud/fedora-coreos/kubernetes/workers/workers.tf | 1 + google-cloud/flatcar-linux/kubernetes/workers/workers.tf | 1 + 3 files changed, 5 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index ad29f97b..6f59c7bb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,12 +4,15 @@ Notable changes between versions. ## Latest +## v1.31.1 + * Kubernetes [v1.31.1](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.31.md#v1311) * Update flannel from v0.25.5 to [v0.25.6](https://github.com/flannel-io/flannel/releases/tag/v0.25.6) ### Google * Add `controller_disk_type` and `worker_disk_type` variables ([#1513](https://github.com/poseidon/typhoon/pull/1513)) +* Add explicit `region` field to regional worker instance templates ([#1524](https://github.com/poseidon/typhoon/pull/1524)) ## v1.31.0 diff --git a/google-cloud/fedora-coreos/kubernetes/workers/workers.tf b/google-cloud/fedora-coreos/kubernetes/workers/workers.tf index 86f7ce61..043d445f 100644 --- a/google-cloud/fedora-coreos/kubernetes/workers/workers.tf +++ b/google-cloud/fedora-coreos/kubernetes/workers/workers.tf @@ -62,6 +62,7 @@ resource "google_compute_region_instance_template" "worker" { name_prefix = "${var.name}-worker-" description = "${var.name} worker instance template" machine_type = var.machine_type + region = var.region metadata = { user-data = data.ct_config.worker.rendered diff --git a/google-cloud/flatcar-linux/kubernetes/workers/workers.tf b/google-cloud/flatcar-linux/kubernetes/workers/workers.tf index 3d971c04..a83bdd0d 100644 --- a/google-cloud/flatcar-linux/kubernetes/workers/workers.tf +++ b/google-cloud/flatcar-linux/kubernetes/workers/workers.tf @@ -62,6 +62,7 @@ resource "google_compute_region_instance_template" "worker" { name_prefix = "${var.name}-worker-" description = "Worker Instance template" machine_type = var.machine_type + region = var.region metadata = { user-data = data.ct_config.worker.rendered