Interview Prep/Terraform/State and Backends in Production

What naming convention do you use for state keys?

BeginnerProductionState and Backends in Production
Answer

Predictable and path-like: <env>/<region>/<stack>/terraform.tfstate, for example prod/ap-south-1/network/terraform.tfstate. It makes IAM prefixes, lifecycle rules and audits easy, and avoids two stacks pointing to the same key by accident.

All Terraform questions Roadmap: Terraform in production

More on State and Backends in Production