How to Find Azure Windows VM Images for Terraform or Packer Deployments
When we need to deploy Windows virtual machines using Terraform or if we need to create a Packer image in Azure, we will need to find the image information of the operating system.
The information required to deploy a Windows virtual machine is:
- Publisher: The organization that created the image. Examples: MicrosoftWindowsServer, MicrosoftWindowsDesktop
- Offer: The name of a group of related images created by a publisher. Examples: WindowsServer, Windows-10
- SKU: An instance of an offer, such as a major release of a distribution. Examples: 2019-Datacenter, 19h2-pro-g2
- Version: The version number of an image SKU.
This story will help you to find Windows images. If you want to list Linux images check https://medium.com/@gmusumeci/how-to-find-azure-linux-vm-images-for-terraform-or-packer-deployments-24e8e0ac68a
1. Listing Image Publishers:
We open our Azure Cloud Shell (PowerShell) or Azure PowerShell CLI.
Login into Azure:
Connect-AzAccount
The process starts by defining our Azure region using a variable:
$location = "West Europe"