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 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] + } }