ad4469dc-7beb-4b7f-90b1-7de.../docs/07_cleanup.md

595 B
Raw Permalink Blame History

7) Cleanup (5 min)

Always delete resources to avoid charges.

From each working directory you used:

terraform destroy -auto-approve || true

If you created the S3 bucket and DynamoDB table for backend testing, remove them after youve destroyed all Terraform-managed resources and the state is no longer needed.

Delete S3 (must be empty first):

aws s3 rm s3://my-terraform-state-lab --recursive
aws s3api delete-bucket --bucket my-terraform-state-lab --region ap-south-1

Delete DynamoDB table:

aws dynamodb delete-table --table-name terraform-locks