pa-07 — Verification

One command

cd pa-07-infrastructure-as-code && bash scripts/verify.sh

What the tests prove

TestInvariant
TestPlanCreateempty state + N desired → N creates
TestApplyTopoOrderapply respects dependencies (vpc → subnet → db) regardless of declaration order
TestIdempotentReapplyre-applying identical config is all no-op
TestPlanUpdatea changed attribute plans an update (with a diff)
TestPlanDeletea resource removed from desired plans a delete
TestDriftDetectionout-of-band edits + unmanaged resources are reported
TestCycleErrora dependency cycle is rejected
TestMissingDependencyErrora dependency on an undefined resource is rejected

All under -race.

What "green" does NOT guarantee

  • In-memory state. Production needs remote state + locking + backups
    • import; state fragility is the real operational hazard.
  • No partial-apply recovery / providers. Real apply is non- transactional against real cloud APIs (exercise).
  • Drift is detected, not auto-corrected. Continuous self-heal is pa-08 (and is itself a policy choice).