What is Terraform Cloud?
Managed service by HashiCorp to run Terraform remotely with team collaboration.
- State stored in cloud (not on your laptop)
- Auto-runs when you push code to GitHub
- Secure variable storage (API keys, secrets)
- Full audit trail
Setup Steps
1. Create Account & Workspace
- Go to app.terraform.io
- Create Organization
- New Workspace → Version Control Workflow
2. Connect to VCS (GitHub)
- Connect to VCS → Authorize GitHub
- Choose a repository (your Terraform code repo)
- Configure settings → Create workspace
3. Add AWS Credentials as Variables
Terraform Cloud needs AWS access to create resources. Do NOT put keys in code.
In IAM → Create User → Attach policy → Create Access Key
Then in Terraform Cloud Workspace → Variables tab: