Automation · Automation Architecture
State Store
Cheat sheet · https://pcornel.dk/topic.php?topic=5187
Answer
A state store keeps the recorded state of managed resources between runs, such as Terraform state, so the tool can calculate what to change. Store it remotely with locking and protect its secrets.
Remember
- The state store records what the tool manages between runs.
- State can contain secrets such as passwords.
- Concurrent writers corrupt state without locking.
First checks
terraform state list— Terraform state contents- Backend (S3/azurerm/consul) with locking — remote state
- State backups/versioning — recovery
Verify in this order
automation → state store → next run compares
Where it usually breaks
Configuration/input → graph/state refresh → plan → provider API request → provider terminal result → resource read-back → effective service state → workload.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5187