How do you build preview (ephemeral) environments?
IntermediateProductionRepository Structure, Environments and Module Strategy
Answer
A pipeline creates a workspace or state key named after the PR (pr-123), applies a slim variant of the stack with auto-expire tags, comments the URL on the PR and runs destroy on PR close, plus a nightly janitor that deletes anything older than N days. Cost controls and quotas matter or leaks pile up.
More on Repository Structure, Environments and Module Strategy
Monorepo or multi-repo for Terraform?BeginnerHow do you lay out environments in a repo?BeginnerWhen would you adopt Terragrunt?BeginnerDo you use tfvars files per environment or code branches?IntermediateHow do you promote a module change from dev to qa to prod?AdvancedWhat is an internal module registry strategy?Beginner