There are currently two methods of using Infracost with Terragrunt:
For costs for a single Terragrunt directory you can run infracost with the
TERRAFORM_BINARYenvironment variable set to
terragrunt. For example:TERRAFORM_BINARY=terragrunt infracost --tfdir=/path/to/code
For aggregating costs across multiple Terragrunt directories, i.e. in cases where you would run terragrunt *-all, you can use the
infracost reportcommand to combine multiple Infracost JSON files into a single table. For an example of a script that does this see scripts/terragrunt/report_all.sh.
We'd love to hear feedback from Terragrunt users, specially ones who'd like to use Infracost in CI/CD pipelines. Please join our community Slack channel or create an issue if there's anything we can help with.