Pcornel
Automation · Automation Fundamentals

Desired State

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

Back to the Topic

Answer

Desired State is the authoritative description of what managed resources or services should look like after automation has converged.

Remember

  • Desired state ≠ current state; configuration intent can exist while runtime reality differs.
  • Desired state ≠ every property; some fields may be generated, learned or intentionally unmanaged.
  • Repository value ≠ authoritative automatically; ownership and promotion rules determine which source wins.
  • Desired configuration ≠ service acceptance; the configured state must still produce the required operational outcome.

First checks

  • Desired state in git — source of truth
  • terraform show — state as known by tool
  • kubectl get <obj> -o yaml — declared spec

Verify in this order

git (desired) → tool → target

Where it usually breaks

Desired state proves what should be true according to an authoritative intent source; it does not prove the target currently matches it.

Configuration/input → graph/state refresh → plan → provider API request → provider terminal result → resource read-back → effective service state → workload.

Desired State automation boundary map

BoundaryHealthy evidenceSuspicious evidence
Intent / inputsOwner, scope and authoritative inputs are explicit and versioned where applicableHidden defaults, stale inventory or competing sources of truth
Decision / executionPlan or decision is explainable and actions are bounded per targetBlind fan-out, implicit assumptions or success based only on executor status
State / verificationTarget is re-observed and acceptance criteria prove the intended outcomeNo read-back, perpetual drift, partial side effects or unresolved exceptions
Recovery / evidenceRetry, rollback or escalation behavior is defined and auditableUnknown partial completion, unsafe retry or evidence lost during remediation

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

Confirmation

Confirm action

Continue?