Current State
Cheat sheet · https://pcornel.dk/topic.php?topic=5158
Answer
Current State is the observed condition of managed targets at a specific time and scope, used to decide what automation should do next.
Remember
- Current state ≠ desired state; observation reports what is, not what should be.
- Cached state ≠ current state automatically; freshness and invalidation matter.
- Controller state ≠ target state if synchronization can lag or fail.
- Observed configuration ≠ full runtime health; service state and dependent systems may require separate checks.
First checks
ansible -m setup <host>— facts (current state)terraform plan -refresh-only— real-world statekubectl get <obj> -o yaml | yq .status— observed status
Commands
show running-config
Verify in this order
target → facts/refresh → current state
Where it usually breaks
Observed current state proves what the selected source reported at that time; it does not prove freshness, completeness or desired correctness unless those boundaries are separately validated.
Configuration/input → graph/state refresh → plan → provider API request → provider terminal result → resource read-back → effective service state → workload.
Current State automation boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Intent / inputs | Owner, scope and authoritative inputs are explicit and versioned where applicable | Hidden defaults, stale inventory or competing sources of truth |
| Decision / execution | Plan or decision is explainable and actions are bounded per target | Blind fan-out, implicit assumptions or success based only on executor status |
| State / verification | Target is re-observed and acceptance criteria prove the intended outcome | No read-back, perpetual drift, partial side effects or unresolved exceptions |
| Recovery / evidence | Retry, rollback or escalation behavior is defined and auditable | Unknown 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=5158