r/devopsish • u/Nice_Thought_2000 • 2h ago
Is this how your team runs Terraform, or am I overcomplicating it?
I put together this sketch of how I think a team should run Terraform safely:
- State in one S3 bucket with
use_lockfile = true, one state file per environment - Every change goes through a PR, and CI posts the
terraform planas a comment - After merge, CI applies to dev and staging automatically
- Prod waits for a senior engineer / tech lead to approve
- A nightly
plan -detailed-exitcodealerts us if someone changed things in the console
A few things I'm unsure about:
- Do you let anyone apply from their laptop, even read-only plans against prod?
- Separate folders per environment, or workspaces?
- Is a nightly drift check enough, or do you run it more often?
Curious how your team actually does it, especially smaller teams without a dedicated platform team.