1.6.0
Migrate to HCL & split code into source, builder & variable files so we can write source blocks once and reuse them across any builder. Building images across providers should just be a case of adding a new source and adding it to the relevant builders files.
File layout is:
Each of the hcl/builder-* files has a name attribute e.g. name = "alin2"
I expected the command to build a specific OS would be packer build -var-file=hcl/vars-alin2.pkrvars.hcl -only=alin2 hcl
however nothing is built.
What am I doing wrong? Or is there an issue with the -only flag?
Hey @vanderboon, thanks for opening, it is not yet possible to do this. For now only/except will solely match the source type and name. I am currently working towards making this part of Packer HCL2 a little bit better and consistent. The issue is this one: #9399
Thanks for the update. I'll monitor #9399.
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.
Most helpful comment
Hey @vanderboon, thanks for opening, it is not yet possible to do this. For now only/except will solely match the source type and name. I am currently working towards making this part of Packer HCL2 a little bit better and consistent. The issue is this one: #9399