-detailed-exitcode
A terraform plan option that exits 0 when there are no changes, 1 on error and 2 when changes are present.
In more detail
A scheduled drift job must treat 2 as drift and 1 as unknown, never as clean. Mixing them up hides either drift or broken checks.
Related terms
- exit code — A number a process returns when it finishes: 0 means success, anything else means something went wrong.
- configuration drift — The slow, unrecorded way machines end up with different versions and settings from each other.
- terraform plan — The command that compares configuration, state and reality and prints the actions needed to make them match, without changing anything.
Taught in
- Continuous IaC Drift Detection & State Protection — Cloud Security & DevSecOps Engineering