Lab Solution Version Control Branching and Workspaces
This guide explains integrating Terraform Cloud with GitHub for managing infrastructure across development, staging, and production environments.
In this guide, you’ll learn how to integrate Terraform Cloud with GitHub to manage infrastructure across development, staging, and production environments. You will:
Create development and staging branches in GitHub
Configure a shared Terraform Cloud variable set for AWS credentials
Point the development workspace to the development branch
Provision a staging workspace on the staging branch
Head to Workspaces overview. You should see all three environments configured:
Workspace Name
Branch
Status
devops-aws-myapp-dev
development
Applied
devops-aws-myapp-staging
staging
Applied
devops-aws-myapp-prod
main
Pending / Applied
Congratulations! You’ve successfully implemented version control branching strategies and workspace management in Terraform Cloud. Next, explore GitOps-native workflows with Terraform Enterprise or integrate policy as code using Sentinel.