Adding an Azure build
The Azure plugin is a bit simpler than the Amazon plugin in that it currently has no data sources and fewer builder options. It resembles the Amazon plugin in that it has a main builder that uses ARM, similar to Amazon’s EBS builder. Azure also supports a chroot builder, much like Amazon, that can speed up builds. Here, we’ll show a sample source for each. The chroot example must also be run from an existing EC2 instance, but we’ll demonstrate chroots with Azure VMs.
Packer’s credentials must have certain roles configured for access to manage VM instances and generate images. Azure makes this very simple compared to other options. There are just two roles required generally – Managed Identity Operator and Virtual Machine Contributor. If you use chroot builders, you don’t need to create a VM, and technically, you could have an extra-secure Packer process using just chroots without Packer ever needing privileges to manage...