Why it matters
IaC pays off when you repeat environments, firewalls, DNS and backup buckets — not for a single hobby VPS.
Practical steps
- Split network/data/app stacks so a bad apply cannot wipe the database volume.
- Store secrets as references (SSM, Secret Manager, Wrangler secrets), never in committed tfvars.
- Require plan/preview in CI before apply to prod.
- Pin provider versions and keep state in a locked remote backend.
- Document rollback: previous container image tag + DNS TTL expectations.
Watch out for
- Recreating webhook hostnames breaks platform allowlists.
- Baking BOT_TOKEN into AMIs or images.