-
Notifications
You must be signed in to change notification settings - Fork 3.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
v1.7.10 broke local references #11554
Comments
Hi @DavidCPorter thanks for reporting. I was able to reproduce using 1.7.10. Interesting enough the results would sometimes vary in the lookup not being able to find the key and sometimes work without issue. In Packer 1.7.9 I got the same results each time. This looks like a regression so I will label it and work to address it for the next release. Do you find the results change if you run Packer multiple times? For the sake of the test I tried passing in a list of different values to the
|
Yes, I ran the build several times with 1.7.10 and each time the local map object was not found. However, using the -debug flag runs the build successfully in 1.7.10. It's probably worth noting that, along with |
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. |
Overview of the Issue
I believe these changes broke references in my locals block from version 1.7.9 -> 1.7.10
https://github.com/hashicorp/packer/pull/11527/files
error
specifically, this line
dynamic_map = { for vm in local.vms_to_build : vm => lookup(local, vm, "VM NAME NOT FOUND") }
produces a map with { vm => "VM NAME NOT FOUND" } in 1.7.10
map should be { vm => local.vm } as it was in 1.7.9
Bottom line... I'm not able to find locals in a locals lookup e.g. lookup(local, "vm name", default)
The text was updated successfully, but these errors were encountered: