Prompt
Do I need state locking in a one-person team?
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
Usually yes, if you’re using shared Terraform/OpenTofu state in a remote backend.
Even for a one-person team, state locking is still valuable because it protects you from:
- accidentally running two applies at once
- a hung CLI session leaving state in use
- making changes from two terminals/machines
- automation and manual runs colliding later
- future-you forgetting and kicking off another deployment
When locking matters
If your state is stored remotely in something like:
- S3 + DynamoDB
- Terraform Cloud / HCP Terraform
- Azure Blob with lease locking
- GCS (depending on tooling/provider support)
then enabling locking is generally best practice, even solo.
When it may not matter much
If you’re truly doing everything:
- from one machine
- one terminal at a time
- with local state only
- no automation
then locking is less critical. But local state is riskier overall, and it doesn’t help if you later introduce CI/CD or another machine.
Recommendation
For a one-person team:
- Use remote state
- Enable state locking
- Keep it on by default
It’s low overhead and avoids nasty corruption or race-condition problems.
If you want, I can also tell you which backends support locking and how to set it up for Terraform/OpenTofu.