Using an Azure Marketplace Image with Packer
Packer is a fantastic tool that lets you automatically build AMIs on AWS or machine images on Azure. It’s common to start from an operating system machine image published by Microsoft but sometimes you may want to try out (and eventually use) a marketplace image. If you’re not familiar with Azure Resource Group Templates or at least to the point where you are intimate with every JSON property for every resource type (nobody is) then you might miss the subtle nuance required for Marketplace images.
I grabbed the publisher information by going through the motions in the Azure Portal.
When I ran the build I got this error:
Turns out you need the following information:
I found the plan information that I needed also in the RGT that Azure generated for me:
Once I did that, all was well.