← Terraform & Infrastructure as Code learning pathTerraform & Infrastructure as Code · Module 7 of 10
Environments and workspaces
Manage dev, staging and production.
📖 Key ideas
- Separate state per environment.
- Options: separate folders/backends per env, or workspaces.
- Use the same modules with different variable files.
- Production changes need review and approval.
- Tag resources with environment and owner.
💡 Real-life example: Environments are rehearsal rooms and the main stage: same play, separate spaces.
EnvironmentDev, staging or production setup
WorkspaceSeparate state in the same config
TagsLabels on resources
PromotionMoving changes from staging to prod