feat(opentofu): decouple the two ForceNew paths from instance_name, and pin the cloud object names #411
Inga granskare
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra!411
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "feat/rename-8c-prep-and-pin"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
ADR 0039 §8c. Two things: the prep that makes
instance_namemetadata-only, and the decision not to use it.Prep
keypair_name(defaultgitborg-prod-key) andguest_hostname(defaultgitborg-prod) replace"${var.instance_name}-key"andhostname: ${var.instance_name}. Both were ForceNew — which is why changinginstance_namealone measured 6 add / 14 change / 6 destroy on 2026-08-04 with both VMsmust be replaced.Defaults are byte-identical to the old expressions and
terraform.tfvarssets onlyinstance_name, so this is a no-op against live state:tofu plan -detailed-exitcode→ zero resource actionstofu fmt -checkclean,tofu validateSuccessDecision: the names stay pinned, permanently
Nothing user-facing resolves any of them — no user, no DNS record, no certificate. They appear in the OpenStack dashboard and
tofu state. Against that, renaming means a create-new-and-repoint on the keypair, a vault edit that must stay in lockstep with a var edit, and two security-group names whose failure mode is silent and deferred to the next runner boot and the next restore drill.ADR 0039's own principle applies unchanged — move the label, pin the value. §8a already demonstrated it on this exact keypair: address moved to
openstack_compute_keypair_v2.bitborg, id stillgitborg-prod-key.The prep still earns its place: pinning by decision and pinning by accident are different states, and a future rebuild shouldn't be forced into a rename it didn't ask for.
The 8c object inventory in the runbook is relabelled a record, not a task list. The 08-04 measurements are marked pre-prep; post-prep numbers were deliberately not taken, so they're an expectation rather than a result.
Found while verifying — worth its own look
tofu planis not clean, and it isn't this change. It exits2onChanges to Outputsalone, which OpenTofu annotates "without changing any real infrastructure".OpenTofu outputs are state and only refresh on
apply. The storedmonitoring_ansible_host_hintstill readsgrafana.gitborg.se— stale since §4 moved the domain, because no apply has run since. That's the outputs analogue of the #63 image-tag gap, and it costs more than it looks: §8a's documented success condition is "tofu planreports No changes", so a permanently-dirty plan destroys the signal that condition relies on.An output-only
tofu applyclears it. Noted for §10 rather than smuggled into this PR.ADR 0039 §8c. Two changes: the prep that makes `instance_name` metadata-only, and the decision not to use it. ## Prep `keypair_name` (default `gitborg-prod-key`) and `guest_hostname` (default `gitborg-prod`) replace `"${var.instance_name}-key"` and `hostname: ${var.instance_name}`. Both of those were ForceNew, which is why changing `instance_name` alone measured `6 to add, 14 to change, 6 to destroy` on 2026-08-04 with both VMs reporting `must be replaced`. Defaults are byte-identical to what the old expressions produced, and `terraform.tfvars` sets only `instance_name`, so this is a no-op against live state: `tofu plan -detailed-exitcode` reports **zero resource actions**. `fmt -check` and `validate` clean. ## Decision: the names stay pinned The live OpenStack object names keep their `gitborg` prefix permanently. Nothing user-facing resolves any of them — no user, no DNS record, no certificate; they appear only in the OpenStack dashboard and `tofu state`. Against that, renaming means a create-new-and-repoint on the keypair, a vault edit that has to stay in lockstep with a var edit, and two security-group names whose failure mode is silent and deferred to the next runner boot and the next restore drill. ADR 0039's own principle applies unchanged: move the label, pin the value. §8a already demonstrated it on this very keypair — address moved to `openstack_compute_keypair_v2.bitborg`, id still `gitborg-prod-key`. The prep still earns its place: pinning by decision and pinning by accident are different states, and a future rebuild should not be forced into a rename it did not ask for. The 8c object inventory in the runbook is relabelled as a record rather than a task list, and the 08-04 measurements are marked as pre-prep — post-prep numbers have deliberately not been taken, so they are an expectation, not a result. ## Found while verifying `tofu plan` is not clean, and it is not this change. It exits 2 on `Changes to Outputs` alone, which OpenTofu annotates "without changing any real infrastructure". Outputs are state and only refresh on `apply`, so the stored `monitoring_ansible_host_hint` still reads `grafana.gitborg.se` — stale since §4 moved the domain. That is the outputs analogue of the #63 image-tag gap, and it matters because §8a's documented success condition is `tofu plan` reporting "No changes". An output-only apply to clear it is noted for §10.