feat(terraform): review production from the operator machine; retire the CI jobs #48
Loading…
Reference in a new issue
No description provided.
Delete branch "jfraeys/chore/prod-plan-local"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Option 2 from the discussion: production Terraform is reviewed and applied from the operator machine, not CI.
Why: prod's non-secret inputs (Zedmail/DMARC values, flags) and the deSEC/OVH credentials live only in the SOPS vault. A CI plan of the production workspace therefore ran on Terraform defaults and wanted to destroy 7 live Cloudflare resources (terraform-plan run 270).
Adds
scripts/plan-prod.sh [plan|drift|both]: runs the linode workspace plan and refresh-only drift from this machine using the vault; read-only; exit 0 clean / 2 changes or drift / 1 error;PLAN_PROD_VERBOSE=1for the attribute-level diff.Removes
terraform-plan.yml,drift-check.yml,terraform-apply.yml(it could only fail at its required variables; adding placeholders would have made it apply the destroys), and the pre-promotion drift gate instaging-validate(it exited 1 without root_pass, so the promotion PR was never opened). The promotion PR text now says to run the script first. README, manifestused_by, the CI-secrets restore runbook and the inventory note are updated.Production apply is now local:
./setup --workspace linode --confirm-prod. Merging the main->prod PR no longer applies anything.First real run (not applied): 0 add, 8 change, 0 destroy, all Cloudflare records: vpn A/AAAA proxied false->true; web
@/mail/wwwA/AAAA content 172.105.107.95 -> .92 (95 is theservicesinstance, 92 isweb). Needs a human decision before any apply.Not verified:
staging-validateafter the promote-job edit (YAML parses; the job only runs on push to main after a passing validate).🤖 Generated with Claude Code