-
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
Unable to use user variable in vagrantfile_template with HCL2 packerfile #10828
Comments
I have investigate a little bit.
So when the
I am still searching why the |
The vagrantfile isn't a full template, and the only variables that can currently be used in it are {{ .BoxName }} and {{ .SyncedFolder }} |
Unfortunately it is the case in the json version and it is a feature I heavily relies on. Thus I won't be able to migrate to hcl2 :( |
Note that the link is pointing to the builder. The issue I saw is on the post-processor and its documentation mentions user variables (https://www.packer.io/docs/post-processors/vagrant#output). |
This issue has been automatically migrated to hashicorp/packer-plugin-vagrant#9 because it looks like an issue with that plugin. If you believe this is not an issue with the plugin, please reply to hashicorp/packer-plugin-vagrant#9. |
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. |
Overview of the Issue
I am generating a vagrantfile when creating a box with packer. In this vagrantfile, I use variables defined in the packer file.
In the vagrantfile.tpl I add tags like {{ user
myvariable
}}. When I use a JSON packer file, everything is ok.I upgraded my packer json file into the HCL2 format and the syntax seems to have changed for those variables as they are not replaced anymore. I may be missing something here but the document "engine" page of the JSON section does not exist in the HCL section.
Reproduction Steps
myvariable
}} syntax.Packer version
1.7.0
Simplified Packer Buildfile
Operating system and Environment details
Linux x86_64
Log Fragments and crash.log files
N/A
The text was updated successfully, but these errors were encountered: