You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Convert foo.pkrvars.json to foo.pkrvars.hcl with packer hcl2_upgrade command. Or just generally it could also be described as supporting conversion from json to hcl for any of the various json file types that packer can read now. That would probably be better.
Use Case(s)
I'm generating my pkrvars variable files from ansible and it's relatively easy to output json with the to_json filter for ansible. However, there is no such thing as a to_hcl filter. If I could then run packer hcl2_upgrade foo.pkrvars.json and it would generate foo.pkrvars.hcl that would help a lot. It's not really just this use case but probably dozens of sources will output json but nothing really supports hcl except packer and terraform.
The text was updated successfully, but these errors were encountered:
Community Note
Please search the existing issues for relevant feature requests, and use the
reaction feature
(https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/)
to add upvotes to pre-existing requests.
Description
Convert foo.pkrvars.json to foo.pkrvars.hcl with packer hcl2_upgrade command. Or just generally it could also be described as supporting conversion from json to hcl for any of the various json file types that packer can read now. That would probably be better.
Use Case(s)
I'm generating my pkrvars variable files from ansible and it's relatively easy to output json with the
to_json
filter for ansible. However, there is no such thing as ato_hcl
filter. If I could then run packer hcl2_upgrade foo.pkrvars.json and it would generate foo.pkrvars.hcl that would help a lot. It's not really just this use case but probably dozens of sources will output json but nothing really supports hcl except packer and terraform.The text was updated successfully, but these errors were encountered: