-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
failure in zipmap shows doesn't produce warning, just shows empty output #12549
Comments
Hi @brikis98, Thanks for the full reproduction here. I think this behavior is a result of outputs not currently displaying error, which I would like to take care of soon. The In the I'm going to leave this open for the |
Aren't they both of length 0?
Empty output seems like the right solution there... |
Oh, you're right, they are in the |
Ha, you're right! That said, this was supposed to be a simple repro of another case where outputs were disappearing. Perhaps I had some typo or error in there too, but Terraform doesn't show an error message in these cases. Is it possible to fix that issue so such bugs are clearer? |
yes, missing output is almost always an indication of an error in the output. Currently you need to look at the logs to see the output errors, but we do intend to make these actual errors displayed to the user soon. I'll close this one as "working as expected" for now |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I'm seeing a strange issue where if you create an output variable with a value that uses
merge
to combine two maps together, if one map is empty, the entire output disappears.Terraform Version
Terraform v0.8.7
Affected Resource(s)
merge
functionzipmap
functionTerraform Configuration Files
The original code is quite complicated and spread across modules. However, I was able to create a convoluted, but standalone repro case:
Expected Behavior
When I run
terraform apply
, I expect to see the following outputs:Actual Behavior
I get the outputs above, but without
foo_bar
:It's strange, because
zipmap
by itself onempty_list
andbar
returns an empty output, as expected. But merging that exact same (empty)zipmap
call with anotherzipmap
call, and the output disappears entirely!Steps to Reproduce
terraform apply
The text was updated successfully, but these errors were encountered: