Reputation: 1417
Terragrunt allows us to execute terraform commands on multiple modules at once ([1]). However sometimes we want to target a single module and its dependencies in order to create and apply a plan for those modules only.
This would look like
terragrunt -target backend-app plan-all
where backend-app is an example name of s module we are targeting.
Is there a way to achieve that with terragrunt cli?
[1] - https://github.com/gruntwork-io/terragrunt#execute-terraform-commands-on-multiple-modules-at-once
Upvotes: 2
Views: 13403
Reputation: 1417
Terragrunt has global options that are not passed down to terraform ([1]).
This did the trick:
terragrunt plan-all --terragrunt-include-dir "backend-app"
There are other options that can be combined to achieve even finer selections.
[1] - https://github.com/gruntwork-io/terragrunt#cli-options
Upvotes: 4