Pcornel
Automation · Drift Management

Desired State

Cheat sheet · https://pcornel.dk/topic.php?topic=6006

Back to the Topic

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

LayerDrift Management → Desired State operational reference
Context identityTerraform / declarative IaC current + exact revision/input/target identity
Persistent intentVersioned contract/configuration with explicit ownership and prerequisites
VerificationValidate inputs/read current state → exercise bounded operation → independent target read-back
Output contractPreserve structured status/IDs/properties before human formatting
Failure boundarySeparate 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

Confirmation

Confirm action

Continue?