-
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
Cannot load HCL vars files with -var-file
argument
#8781
Comments
Hello @mechastorm, thanks for opening, this is not supported yet. Currently to use var files you need to put them in the same folder as the build files you are using and to run Currently passing the |
@azr I see in #8540 you mentioned that the documentation gets updated once per release, which may be why the current documentation is misleading; however is there a way to update docs to make the level of HCL support clearer? The current documentation gives the impression the build is fully supported for existing features, which is not the case. I'd think for users, something like "we are implementing" or similar would make it clearer that this is a work in progress, and help people who are less edge adopters to avoid getting frustrated with Packer during the transition. |
Yeah, the documentation at https://packer.io/docs/configuration/from-1.5/variables.html#variable-definitions-pkrvars-hcl-files doesn't really line up with the behavior right now. In addition to not supporting HCL variable files as was already mentioned, JSON variable files suffer from #8748 (you have to double-quote strings to work around), so the example JSON file in the docs doesn't work, either. |
Thanks for the notes -- I'll try to get a docs fix in this week so that current behavior is properly reflected on the website. |
Hey here, I've been re-reading the docs and sorry, the docs are a bit ahead of the features and should not have been mentioning the |
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
Can't seem to load
.pkrvars.hcl
files with the-var-file
argument. I am not sure if it a bug with packer or the way I am using packer.Reproduction Steps
I run the command
The contents of
env/networking.pkrvars.hcl
I get the following error instead
Packer version
1.5.4
Operating system and Environment details
mac OS X 10.13.6
The text was updated successfully, but these errors were encountered: