- A GitHub repository with valid terraform code. Don’t have one? see Example repo
- Your cloud provider credentials:
- For AWS: Hashicorp’s AWS tutorial
- For GCP: Hashicorp’s GCP tutorial
- For Azure: Hashicorp’s Azure tutorial
Prerequisite: OpenTaco account setup
Complete Set up your OpenTaco account before continuing.
Prerequisite: GitHub App installed
Complete Set up GitHub App before continuing.
Create Action Secrets with cloud credentials
In GitHub repository settings, go to Secrets and Variables - Actions. Create the following secrets:
- AWS
- GCP
- Azure
AWS_ACCESS_KEY_ID-AWS_SECRET_ACCESS_KEYYou can also use OIDC for AWS authentication.
Tip: Set GitHub Action secrets with gh CLI
Tip: Set GitHub Action secrets with gh CLI
From the repository root (with GitHub CLI installed):
Create digger.yml
This file contains Digger configuration and needs to be placed at the root level of your repository. Assuming your terraform code is in the
prod directory:Create Github Actions workflow file
Place it at
.github/workflows/digger_workflow.yml (name is important!)- AWS
- GCP
- Azure
Create a PR to verify that it works
Terraform will run an existing plan against your code.Make any change to your terraform code e.g. add a blank line. An action run should start (you can see log output in Actions). After some time you should see output of Terraform Plan added as a comment to your PR.
Then you can add a comment like
If you forked one of the demo repositories you will need to enable Actions in your repository.
digger apply and shortly after apply output will be added as comment too.
