From 483cb188bcf8fbd2f3acf82807b71418b11e6868 Mon Sep 17 00:00:00 2001 From: Leonhardt Wille Date: Mon, 16 Nov 2026 13:50:48 +0100 Subject: [PATCH 1/2] fix(CO-38): ignore server_type drift on Hetzner servers Server types are picked at creation time and we want to fall back to another type or location when the preferred one is unavailable. Ignore server_type changes in the lifecycle block of all hcloud_server resources in the demo, staging and offline examples so that subsequent `terraform plan` calls do not delete and recreate already provisioned servers. --- terraform/examples/wiab-demo-hetzner/main.tf | 6 +++++- .../examples/wiab-staging-hetzner/main.tf | 9 +++++++++ .../main.tf | 19 +++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/terraform/examples/wiab-demo-hetzner/main.tf b/terraform/examples/wiab-demo-hetzner/main.tf index 1824c4652..c29efdcdf 100644 --- a/terraform/examples/wiab-demo-hetzner/main.tf +++ b/terraform/examples/wiab-demo-hetzner/main.tf @@ -85,5 +85,9 @@ resource "hcloud_server" "host" { image = "ubuntu-24.04" ssh_keys = [hcloud_ssh_key.host.name] server_type = var.server_type - + lifecycle { + ignore_changes = [ + server_type, + ] + } } diff --git a/terraform/examples/wiab-staging-hetzner/main.tf b/terraform/examples/wiab-staging-hetzner/main.tf index 65d7e5e54..5b4f1688a 100644 --- a/terraform/examples/wiab-staging-hetzner/main.tf +++ b/terraform/examples/wiab-staging-hetzner/main.tf @@ -138,6 +138,9 @@ resource "hcloud_server" "adminhost" { network_id = hcloud_network.main.id ip = "" } + lifecycle { + ignore_changes = [server_type] + } } # The server hosting all the bootstrap assets @@ -162,6 +165,9 @@ resource "hcloud_server" "assethost" { network_id = hcloud_network.main.id ip = "" } + lifecycle { + ignore_changes = [server_type] + } } resource "random_pet" "kubenode" { @@ -187,6 +193,9 @@ resource "hcloud_server" "kubenode" { network_id = hcloud_network.main.id ip = "" } + lifecycle { + ignore_changes = [server_type] + } } resource "random_pet" "datanode" { diff --git a/terraform/examples/wire-server-deploy-offline-hetzner/main.tf b/terraform/examples/wire-server-deploy-offline-hetzner/main.tf index de792a0d0..b86475b55 100644 --- a/terraform/examples/wire-server-deploy-offline-hetzner/main.tf +++ b/terraform/examples/wire-server-deploy-offline-hetzner/main.tf @@ -142,6 +142,10 @@ resource "hcloud_server" "adminhost" { network_id = hcloud_network.main.id ip = "" } + + lifecycle { + ignore_changes = [server_type] + } } # The server hosting all the bootstrap assets @@ -216,6 +220,9 @@ resource "hcloud_server" "cassandra" { network_id = hcloud_network.main.id ip = "" } + lifecycle { + ignore_changes = [server_type] + } } resource "random_pet" "elasticsearch" { @@ -241,6 +248,9 @@ resource "hcloud_server" "elasticsearch" { network_id = hcloud_network.main.id ip = "" } + lifecycle { + ignore_changes = [server_type] + } } resource "random_pet" "minio" { @@ -266,6 +276,9 @@ resource "hcloud_server" "minio" { network_id = hcloud_network.main.id ip = "" } + lifecycle { + ignore_changes = [server_type] + } } resource "random_pet" "postgresql" { @@ -291,6 +304,9 @@ resource "hcloud_server" "postgresql" { network_id = hcloud_network.main.id ip = "" } + lifecycle { + ignore_changes = [server_type] + } } resource "random_pet" "rabbitmq" { @@ -316,4 +332,7 @@ resource "hcloud_server" "rabbitmq" { network_id = hcloud_network.main.id ip = "" } + lifecycle { + ignore_changes = [server_type] + } } From 03870e7f275edfaaff234a783665757828f4b63f Mon Sep 17 00:00:00 2001 From: Leonhardt Wille Date: Mon, 16 Nov 2026 13:59:01 +0100 Subject: [PATCH 2/2] chore(changelog) --- changelog.d/5-bug-fixes/fix-unavailable-server-types | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5-bug-fixes/fix-unavailable-server-types diff --git a/changelog.d/5-bug-fixes/fix-unavailable-server-types b/changelog.d/5-bug-fixes/fix-unavailable-server-types new file mode 100644 index 000000000..028cea26c --- /dev/null +++ b/changelog.d/5-bug-fixes/fix-unavailable-server-types @@ -0,0 +1 @@ +Fixed: subsequent provisioning retries to change server_type will not automatically tear down already deployed machines