-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
panic on passing non-string key to map() #23043
Comments
@alxrem this function appears to be depreciated in terraform 0.12: https://www.terraform.io/docs/configuration/functions/map.html |
Thank you. I don't use it, only reported the noticed bug. |
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. |
The map function assumed that the key arguments were strings, and would panic if they were not. After this commit, calling `map(1, 2)` will result in a map `{"1" = 1}`, and calling `map(null, 1)` will result in a syntax error. Fixes hashicorp#23346, fixes hashicorp#23043
Terraform Version
Terraform Configuration Files
Debug Output
https://gist.github.com/alxrem/16972d40bbfe8df2fbecac6720a9b5a8
Crash Output
https://gist.github.com/alxrem/af55977e452fbd3c6be0c192c05bc3bd
Expected Behavior
Error message from syntax parser.
Actual Behavior
Panic
Steps to Reproduce
The text was updated successfully, but these errors were encountered: