Automation · Idempotency
Desired State
Cheat sheet · https://pcornel.dk/topic.php?topic=5997
Answer
Desired state in idempotency is the target description the operation compares against, such as 'package present at version 1.2', so it knows whether any change is needed.
Remember
- Desired state defines the target.
- Compare before acting.
- Report differences.
First checks
- Desired state defined explicitly — input
- Single source for desired state — authority
- Comparison logic — diff
Verify in this order
desired state → comparison → actions
Where it usually breaks
Configuration/input → graph/state refresh → plan → provider API request → provider terminal result → resource read-back → effective service state → workload.
Idempotency → Desired State · operational reference
| Layer | Idempotency → Desired State operational reference |
|---|---|
| Context identity | Declarative configuration management / Puppet 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=5997