-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Overview of the Issue
When I run pucker build . I get error Invalid value for "vars" parameter: vars map does not contain key. Packer shows that referenced line is in .pkrtpl.hcl file and that line is commented out.
Reproduction Steps
Create simple packer template using .pkrtpl.hcl template, and in a Identity block use wrong var name.
For example: realname: ${wrong_var_name}. Run pucker build .
Packer version
Packer v1.12.0
Operating system and Environment details
Windows 11 24H2
Log Fragments and crash.log files
Call to function "templatefile" failed:
var.guest_password_encrypted as "REPLACED",
C:/Users/User/Documents/GitHub/boilerplates/packer/proxmox/ubuntu_24.04/data/user-data.pkrtpl.hcl:43,30-31:
var.guest_username as "REPLACED",
Extra characters after interpolation expression; Expected a closing brace to end
var.vm_guest_os_timezone as "REPLACED",
the interpolation expression, but found extra characters.
var.vm_name as "ubuntu-server-noble-numbat".
This can happen when you include interpolation syntax for another language, such
as shell scripting, but forget to escape the interpolation start token. If this
is an embedded sequence for another language, escape it by starting with "$${"
Call to function "templatefile" failed:
instead of just "${"..
C:/Users/User/Documents/GitHub/boilerplates/packer/proxmox/ubuntu_24.04/data/user-data.pkrtpl.hcl:43,30-31:
2025/05/02 02:54:39 [INFO] (telemetry) Finalizing.
Extra characters after interpolation expression; Expected a closing brace to end
the interpolation expression, but found extra characters.
This can happen when you include interpolation syntax for another language, such
as shell scripting, but forget to escape the interpolation start token. If this
is an embedded sequence for another language, escape it by starting with "$${"
instead of just "${"..