Skip to content
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

Call to function "map" failed: panic in function implementation: not a string #23346

Closed
sbrandtb opened this issue Nov 12, 2019 · 1 comment · Fixed by #24277
Closed

Call to function "map" failed: panic in function implementation: not a string #23346

sbrandtb opened this issue Nov 12, 2019 · 1 comment · Fixed by #24277
Labels
bug config crash v0.12 Issues (primarily bugs) reported against v0.12 releases

Comments

@sbrandtb
Copy link

Terraform Version

Terraform v0.12.13

Terraform Configuration Files

It is sufficient to run this in the Terraform console:

map(null, 1)

Crash Output

https://gist.github.com/sbrandtb/c126f844dafe304df379572ec21f1495

Expected Behavior

Error message similar to this

Actual Behavior

Crash.

Steps to Reproduce

  1. terraform console
  2. map(null, 1)

References

Similar: #21548

@hashibot hashibot added bug config crash v0.12 Issues (primarily bugs) reported against v0.12 releases labels Nov 12, 2019
alisdair added a commit that referenced this issue Mar 4, 2020
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 #23346, fixes #23043
alisdair added a commit that referenced this issue Mar 4, 2020
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 #23346, fixes #23043
@ghost
Copy link

ghost commented Apr 4, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
noahmercado pushed a commit to noahmercado/terraform that referenced this issue Apr 8, 2020
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug config crash v0.12 Issues (primarily bugs) reported against v0.12 releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants