Automation · Drift Management
Desired State
Cheat sheet · https://pcornel.dk/topic.php?topic=6006
Answer
Desired state in drift management is the authoritative definition of how systems should be, kept in Git or a source of truth, against which actual state is measured.
Remember
- Lives in Git or a source of truth.
- Must be reviewed.
- Is the reference for all comparisons.
First checks
- Declared state in git/SoT — authority
- Version used for comparison — reference
- Environment-specific values — per env
Verify in this order
git/SoT → desired state
Where it usually breaks
Configuration/input → graph/state refresh → plan → provider API request → provider terminal result → resource read-back → effective service state → workload.
Drift Management → Desired State · operational reference
| Layer | Drift Management → Desired State operational reference |
|---|---|
| Context identity | Terraform / declarative IaC current + exact revision/input/target identity |
| Persistent intent | Versioned contract/configuration with explicit ownership and prerequisites |
| Verification | Validate inputs/read current state → exercise bounded operation → independent target read-back |
| Output contract | Preserve structured status/IDs/properties before human formatting |
| Failure boundary | Separate source/input/engine/controller execution from downstream target outcome |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6006