Skip to content

Tear down the stack

Teardown destroys everything billable with a full tofu destroy of the main stack. It keeps the S3 state bucket, the ECR repos (cents), and the CI bootstrap role — so a later deploy brings the stack straight back.

Actions → Teardown → Run workflow → type destroy in the confirm box. Anything else aborts. See Deploy via CI.

Terminal window
export AWS_PROFILE=<sso-profile>
./scripts/teardown.sh

The script scales the fck-nat ASG to 0 and waits for the NAT instance to terminate before tofu destroy — otherwise the relaunching NAT instance holds the security group Tofu is trying to delete and the destroy deadlocks. It then runs tofu -chdir=infra destroy -auto-approve.

When it finishes, idle cost is back to ~€0 (S3 state + ECR only).