595 B
595 B
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 you’ve 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