How do you shut down non-production environments out of hours?
IntermediateProductionHCP Terraform, OpenTofu, Scale and Cost
Answer
Options: scheduled pipeline running terraform destroy on preview stacks (and apply in the morning), an ASG aws_autoscaling_schedule or Instance Scheduler for stateful but idle resources, or TTL tags and a janitor. Destroy/apply cycles are only safe for stacks with no state worth keeping, so keep data layers separate.
More on HCP Terraform, OpenTofu, Scale and Cost
How do you design workspaces and projects in HCP Terraform?IntermediateWhat execution modes does HCP Terraform offer?BeginnerWhat are the three run workflows in HCP Terraform?BeginnerHow are variable sets and sensitive variables used?BeginnerHow is HCP Terraform priced, and how does it affect design?IntermediateHow do you choose between HCP Terraform, Atlantis, Spacelift and plain GitHub Actions?Advanced