In this tutorial we will be using a repository in order to configure a terraform pipeline In order to use Terraform workspaces with Digger we follow the steps below:

Let’s create our first pull request with a change and see this in action:

  1. Fork the demo repository

  2. Enable Actions (by default workflows won’t trigger in a fork)

  1. In your repository settings > Actions ensure that the Workflow Read and Write permissions are assigned - This will allow the workflow to post comments on your PRs

  1. Add environment variables into your Github Action Secrets (cloud keys are a requirement since digger needs to connect to your account for coordinating locks). In this case we are setting AWS keys for this demo but you can follow GCP or Azure steps as seen fit.

Note: There are several things here which are different from the other repositories here. Ofcourse we have a terragrunt.hcl file which marks that it is the root of our repository. We have set terragrunt: true in our digger.yml configuration. We also modified our action to install terragrunt prior to running the digger action.

  1. make a change in and create a PR - You should see the appropriate plan in the pull request as a comment.

  1. Lets apply the PR and merge it to unlock the flow for our colleagues. We can do this by commenting digger apply


In this tutorial we created a terragrunt based project and used digger to plan and apply the resources in it within a collaorative environment.