Quickstart
Get started with Terraform Branch Deploy in your repository in just a few steps.
Prerequisites
Before you begin, make sure you have:
- A GitHub repository with your Terraform configuration files
- Cloud provider credentials (AWS, Azure, GCP, etc.)
- Permissions to use GitHub Actions and Deployments
1. Add the Workflow
Create a workflow file at .github/workflows/terraform-deploy.yml
in your repository:
2. Configure Environments
Add a .tf-branch-deploy.yml
file to your repository root. Example:
3. Deploy from a Pull Request
Comment on any pull request to preview, deploy, or rollback changes:
.plan to dev
— Preview changes for thedev
environment.apply to dev
— Deploy changes to thedev
environment.apply main to prod
— Rollbackprod
to themain
branch
Tip
Add extra Terraform arguments with a pipe, e.g. .plan to dev | -var=debug=true
Next Steps
- See Configuration for advanced options
- Explore Commands for all supported PR commands
- Learn about Advanced Workflows and best practices