-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Known Issue] terraform show
output when using tgenv
#762
Comments
If I understand correctly, this is a bug in If this is indeed a bug in |
I think that makes sense to close the issue! FYI, I added this issue just so that people know that it's still not fixed (open issue vs closed) and that they will see this error. I also noticed that it's a tricky one, and most people who hit this issue will not understand that it's not a terratest bug. So they will probably come here first. Also, we are planning to make headway on a decision about tgenv/tgswitch, it could work to keep this open until then. I see this as a "open issue, won't fix" (since the fix would need to happen elsewhere). I'm just not sure about open/closed in terms of open-source best practices. |
Sure, let's leave it open until then! 👍 |
Thanks for this write-up - was helpful as we just ran into the same thing! |
For posterity, a workaround: On my function info() {
# echo -e "\033[0;32m[INFO] ${1}\033[0;39m"
echo "" &> /dev/null
} And then it worked :/ |
If you're using tgenv to manage your terragrunt versions, you may run into an issue when running
terraform.Show
using this terraform module in terratest:"github.com/gruntwork-io/terratest/modules/terraform"
. If you callterraform.Show
passing in-json
as an option,tgenv
will output an info log message to stdout which will get captured as the first line of the output ofterraform.Show
. When you try to parse that output, you'll end up with a parse error. E.g., this was the errant line I saw:The best fix for this is for
tgenv
to send this log to stderr, but this issue has been raised already on that repo, and a fix is not yet merged up.In the meantime, be advised of this issue!
A stopgap solution is to stop using tgenv and install terragrunt using the gruntwork-installer directly, with
gruntwork-install --binary-name "terragrunt" --repo "https://github.com/gruntwork-io/terragrunt" --tag "<VERSION>"
.The text was updated successfully, but these errors were encountered: