Declarative Automation
Cheat sheet · https://pcornel.dk/topic.php?topic=5155
Answer
Declarative Automation expresses the intended end state or policy and lets an engine determine the actions required to converge current state toward that declaration.
Remember
- Declarative ≠ idempotent automatically; provider behavior, unknown state and side effects can still break convergence.
- Declarative ≠ no ordering; dependencies and resource graphs still impose execution relationships.
- Desired configuration ≠ observed reality; drift and failed apply can leave state divergent.
- Less procedural code ≠ less operational complexity; the engine/provider absorbs some complexity rather than eliminating it.
First checks
terraform plan— declared vs actualkubectl diff -f manifest.yaml— Kubernetes declarative diffansible-playbook --check --diff— declared state preview
Verify in this order
desired state declaration → engine computes changes → apply
Where it usually breaks
A valid declaration expresses intent; it does not prove the engine can reach that state or that the provider will do so without disruptive replacement.
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Declarative Automation 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=5155