pa-07 — Verification
One command
cd pa-07-infrastructure-as-code && bash scripts/verify.sh
What the tests prove
| Test | Invariant |
|---|---|
TestPlanCreate | empty state + N desired → N creates |
TestApplyTopoOrder | apply respects dependencies (vpc → subnet → db) regardless of declaration order |
TestIdempotentReapply | re-applying identical config is all no-op |
TestPlanUpdate | a changed attribute plans an update (with a diff) |
TestPlanDelete | a resource removed from desired plans a delete |
TestDriftDetection | out-of-band edits + unmanaged resources are reported |
TestCycleError | a dependency cycle is rejected |
TestMissingDependencyError | a 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).