terraform destroy to terminate all instances, release Elastic IPs, and remove every AWS resource created by redStack. Leaving the lab running incurs charges 24/7.
Destroy the lab
Confirm the operation
Terraform prints the full destroy plan and prompts for confirmation. Type
yes and press Enter.Verify clean teardown
Afterterraform destroy completes, confirm in the AWS console that no billable resources remain. Open the EC2 Dashboard and check each section. Make sure the console region matches the region in terraform.tfvars — resources are invisible when viewing the wrong region.
EC2 → Instances
EC2 → Instances
All redStack instances should show terminated status. AWS keeps terminated instance records for a short period before they disappear from the list. A All entries should show
running or stopped instance after destroy means something went wrong — investigate and manually terminate if needed.Quick CLI check:"State": "terminated".EC2 → Elastic IPs
EC2 → Elastic IPs
No redStack Elastic IPs should remain allocated. Two EIPs are created at deploy time (Guacamole and redirector). If either remains after destroy, it will accrue hourly charges indefinitely.If an EIP remains, release it manually:
- EC2 → Network & Security → Elastic IPs
- Select the EIP → Actions → Release Elastic IP address
VPC → Your VPCs
VPC → Your VPCs
Both redStack VPCs should be removed:
- Team server VPC (
172.31.0.0/16or your customvpc_cidr) - Redirector VPC (
10.60.0.0/16or your customredirector_vpc_cidr)
EC2 → Key Pairs
EC2 → Key Pairs
rs-rsa-key will still be listed after terraform destroy. The SSH key pair is created manually before deployment and is not managed by Terraform — it persists across deployments by design so you do not need to recreate it each time.Delete it manually only if you are permanently done with redStack:- EC2 → Network & Security → Key Pairs
- Select
rs-rsa-key→ Actions → Delete
Deleting the key pair from AWS does not delete the local
.pem file. Keep the file if you plan to redeploy.Redeploying from scratch
To spin up a fresh lab after a clean destroy:Verify the previous destroy completed cleanly
Check the EC2 Dashboard as described above. Do not redeploy on top of a partially destroyed environment — it will cause Terraform state conflicts.
Review terraform.tfvars
Your configuration file is preserved between deployments. Update any values you want to change (instance types, URI prefixes, VPN settings) before redeploying.
Partial cleanup: stopping instances without destroying
If you want to pause the lab between sessions without destroying it, stop all instances from the EC2 Dashboard:- EC2 → Instances → Instances
- Select all redStack instances
- Instance State → Stop
- Select the same instances
- Instance State → Start
- Wait 5-10 minutes for services to come back up
