terragrunt
terragrunt copied to clipboard
`terragrunt run-all show` parse by directories in stack
Versions:
terragrunt==0.28.1
terraform==0.14.4
Background:
I have a plan.json file within each child terragrunt directory .terragrunt-cache/.../.terraform/ that was created by terragrunt run-all plan -out plan.json
Problem:
Running terragrunt run-all show -json plan.json on the stack outputs the plan for each child terragrunt directory. Currently, the above command concatenates all of the child terragrunt plans into one long string. I want to partition the output of the command by each child directory although within the plan.json that there's no attribute to identify the terragrunt directory.
Example scenario:
Run: terragrunt run-all show -json plan.json
Current output:
{"format_version":"0.1","terraform_version":"0.14.5","variables":{"names":{"value":["bar"]}}, ......}
{"format_version":"0.1","terraform_version":"0.14.5","variables":{"names":{"value":["bar"]}}, ......}
Proposed new output (or something along the lines of):
terragrunt-dir='foo/'
{"format_version":"0.1","terraform_version":"0.14.5","variables":{"names":{"value":["bar"]}}, ......}
terragrunt-dir='foo/bar'
{"format_version":"0.1","terraform_version":"0.14.5","variables":{"names":{"value":["bar"]}}, ......}
I think I opened an issue earlier for a feature that might also address this issue... https://github.com/gruntwork-io/terragrunt/issues/1194
+1 would love an option like requested in #1194 which would show which folder the stdout is for.
as idea for workaround: https://www.infracost.io/docs/troubleshooting/#terragrunt