Using Terragrunt
There are 2 ways of using Digger with Terragrunt:
- individual projects
- dynamically generated projects
Individual projects
Digger uses a single terragrunt project if you just list it as a project as follows:
This will perform a terragrunt apply
after changes are detected within this directory.
Dynamically generating Terragrunt projects
This is not the preferred way of generating terragrunt projects and we advise you to instead use the blocks declarative since this way may be deprecated in the future
In many cases with terragrunt you don’t want to mention all of your terragrunt components since there can be tens or hundreds of those (not to mention all the dependencies of those). In this case you can just leave it to digger and it will perform dynamic generation of projects for you before triggering the relevant terragrunt apply
commands on all impacated projects per pull request. It will also handle dependencies of these projects. You can configure this using the following:
And the workflow for this needs to use setup-terragrunt: true
as follows: