The code I learn by example, so see my github repo for the full source code!
https://github.com/tvories/packer-vsphere-hcl
Packer, as of 1.5, now supports HCL. This gives it a lot more flexibility over regular JSON and makes it very similar to terraform.
There aren’t a lot of great examples of how to convert packer from json to HCL, though, and practically zero that leverage vsphere-iso as the builder. Most of the HCL example code for packer is written for aws.
Continue reading