Prerequisites
- 2 Terraform projects with remote backends - example repo
- 2 pairs of AWS keys
- Using digger with orchestrator
Create digger.yml file
Placedigger.yml file in the root of your repo. Point dir to folders with terraform
Create 2 environments in GitHub
- In your GitHub repo, go to Settings > Environments
- Press âNew Environmentâ
- Name one âdevelopmentâ and another âproductionâ
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEY
Create 2 Actions workflow files
.github/workflows/digger-run-dev.ymlfor dev.github/workflows/digger-run-prod.ymlfor prod
environment and the Rename step from Dev to Prod
Verify that it works
Thatâs it! Now you can use Digger to automate your Terraform PRs.- Create a PR that changes terraform in one of your projects
- You should see 2 Actions jobs started
- Shortly after, a comment with plan output for the affected project will be added
- You can comment
digger applyto apply changes - If you do so, another Action job will start to run apply

