Skip to content

ADR-0001: Terraform-only deployments

  • Status: Accepted
  • Deciders: Platform engineering
  • Context: Constitution Principle IX

Context

Both the local (kind) and cloud (EKS) environments run Kubernetes plus a Kong gateway. Early on, changes were sometimes applied imperatively — kubectl apply, helm upgrade, deck sync, kind load — which drifted the live state away from what version control described. Drift makes environments irreproducible, hides what is actually deployed, and defeats the deployment-parity gate (RW-700).

Decision

All deployments go through terraform apply, on every target. Locally this is scripts/local.sh stack; in the cloud it is the Azure DevOps pipeline's terraform apply stage. Imperative kubectl / helm / deck / kind mutations of deployed state are prohibited.

Consequences

  • The Terraform state is the single description of every environment; there is no "apply it by hand just this once" path. Reproducibility and parity checks become meaningful.
  • A one-line config change can require a full terraform apply; the every-minute gateway config resync (deck) absorbs Kong config-only changes so we don't hand-run deck.
  • New deployables must be declared in Terraform (and in terraform/parity/manifest.yaml) for both targets before they can ship — see ADR-0004 and the parity gate.