Pcornel
Automation

Drift Management

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

Back to the Topic

Answer

Drift management compares the actual state of systems with the desired state in code, reports differences and fixes them automatically or manually, keeping configuration consistent over time.

Remember

  • Drift comes from manual changes, failed runs or other tools.
  • Detect first, then decide: fix the system or update the code.
  • Report drift trends to find root causes.

First checks

  • Drift reports per system — visibility
  • Remediation policy (auto vs manual) — decision
  • Drift sources analysis — prevention

Verify in this order

desired vs actual → drift → report → remediate → prevent

Where it usually breaks

Automation/controller success is not target-state proof; target config/state is not effective-runtime proof; effective state is not workload proof.

→ Drift Management · operational reference

LayerDrift Management operational reference
Runtime/ownershipTerraform / declarative automation current · identify controller/worker/target ownership before mutation
Persistent intentVersioned configuration/playbook/workflow with explicit dependencies and least-privilege identity
Verificationterraform plan -refresh-only -detailed-exitcode; terraform plan -detailed-exitcode
Expected interpretationThe workflow distinguishes actual remote state from recorded state and desired configuration, classifies authorized vs unauthorized divergence, and chooses adopt/reconcile/ignore deliberately.
Recovery boundaryPreserve correlation IDs + pre-state, then verify target/service independently after remediation

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6004

Confirmation

Confirm action

Continue?