Terragrunt parsing support #843
-
Feature OverviewTerragrunt is a Terraform wrapper to handle DRY configuration of multiple environments managed through Terraform. Terragrunt runs multiple modules one after another and has next to no output of it's own, it would be nice to also handle the outputs of those as though they were one Terraform Why is the feature needed?Currently runs of Does the feature include Breaking Changes?By always looking for multiple blocks Terragrunt could be supported at the same time as continuing support for Terraform. Example CodeNo small code example as it would change the internal parsing behavior. ReferenceNo response |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 18 replies
-
Thank you for your proposal. |
Beta Was this translation helpful? Give feedback.
-
What's the desirable hahaviour of this case? 🤔
|
Beta Was this translation helpful? Give feedback.
-
📝 We need to get the list of modules from the following output.
|
Beta Was this translation helpful? Give feedback.
-
Sorry at first only saw your first answer. Never worked with the discussions feature before and the mobile UI is a bit clunky. From my point of view at first I was fine with just concatenating all of the modules output blocks. |
Beta Was this translation helpful? Give feedback.
-
I found that we can post the result of terragrunt with tfcmt by terragrunt --terragrunt-tfpath option.
$ vi tfwrapper.sh
$ chmod a+x tfwrapper.sh tfwrapper.sh #!/bin/bash
set -euo pipefail
command=$1
base_dir=$(git rev-parse --show-toplevel) # Please fix if necessary
target=${PWD#"$base_dir"/}
if [ "$command" == "plan" ]; then
tfcmt -var "target:${target}" plan -- terraform "$@"
elif [ "$command" == "apply" ]; then
tfcmt -var "target:${target}" apply -- terraform "$@"
else
terraform "$@"
fi
$ terragrunt run-all plan --terragrunt-tfpath "<absolute path of tfwrapper.sh>" Then the result of |
Beta Was this translation helpful? Give feedback.
I found that we can post the result of terragrunt with tfcmt by terragrunt --terragrunt-tfpath option.
terraform
and make it executabletfwrapper.sh
terragrunt run-all
with--terragrunt-tfpath
$ terragrunt run-all plan --terragrunt-tfpath "<absolute path of tfwrapper.sh>"
T…