4.1.1 - Azure Image

This will walk you through the process to retrieve the details for a specific image from the Azure marketplace, Azure Cloud Shell and Azure CLI

A Tuono Blueprint allows you to specify multiple images to deploy into your cloud providers. To specify an image from the Azure marketplace we need the Publisher, Product and SKU of the image. This snippet shows how an image is defined under compute.vm.image schema.

compute:
  image:
    windows:
      publisher: cognosys
      product: hardened-iis-on-windows-datacenter-2019 
      sku: hardened-iis-on-windows-datacenter-2019

Azure Marketplace

  1. From the Azure marketplace navigate to the desired VM that you would like to create, click GET IT NOW and Continue, granting Microsoft permissions and agreeing to the pricing - where required.

In our example we will use the VM Hardened IIS On Windows Datacenter 2019. This image has an associated cost, so permissions must be granted to use it in your Blueprints.

  1. On the VM page select the Usage Information + Support tab.

Copy the following information:

  • Publisher ID: cognosys

  • Offer ID: hardened-iis-on-windows-datacenter-2019

  • Plan ID: hardened-iis-on-windows-datacenter-2019

  1. Create an image in your Blueprint and add the required:

  2. publisher = Publisher ID

  3. product = Offer ID

  4. sku = Plan ID

compute:
  image:
    windows:
      publisher: cognosys
      product: hardened-iis-on-windows-datacenter-2019 
      sku: hardened-iis-on-windows-datacenter-2019

Azure Powershell

  1. Select a subscription and create a storage account by clicking Create storage

  2. Change the environment type to Powershell in the top left

  1. Find an image from a specific region, using Powershell within the Cloud Shell

Get-AzVMImageOffer -Location "east us" -PublisherName "cognosys"
  • Search the table to find your specific Offer and PublisherName details.

Offer                                    PublisherName  Location   Id
-----                                    -------------  --------   --
hardened-iis-on-windows-datacenter-2019  cognosys       eastus     /Subscriptions/33de00cd-d545-47cb-8939-193f9b5fafa4/Providers/Microsoft.Compute/Locations/eastus/Publishers/cognosys/ArtifactTypes/VMImage/Offers/hardened-iis-on…
  1. Get the Skus of the specific image, using the Offer and PublisherName from the previous step

Get-AzVMImageSku -Location "east us" -PublisherName "cognosys" -Offer "hardened-iis-on-windows-datacenter-2019"
  • This will return:

Skus                                    Offer                                   PublisherName  Location   Id
----                                    -----                                   -------------  --------   --
hardened-iis-on-windows-datacenter-2019 hardened-iis-on-windows-datacenter-2019 cognosys       eastus     /Subscriptions/33de00cd-d545-47cb-8939-193f9b5fafa4/Providers/Microsoft.Compute/Locations/eastus/Publishers/cognosys/ArtifactTypes/V…
  1. Create an image in your Blueprint using the obtained information.

compute:
  image:
    windows:
      publisher: cognosys
      product: hardened-iis-on-windows-datacenter-2019 
      sku: hardened-iis-on-windows-datacenter-2019

Azure CLI

  1. Install the Azure CLI or use Azure Cloud Shell to use the Azure CLI

For local installation, you'll need to log in and follow the prompts:

az login
  • For Cloud Shell, change the environment type to Bash in the top left

  • Use the az vm image list command to search for specific images:

az vm image list --all --offer "IIS" --publisher "cognosys" --output table
  • Search the table to find your specific image details.

Offer                                             Publisher   Sku                                               Urn                                                                                                                Version
------------------------------------------------- ----------- ------------------------------------------------- ------------------------------------------------------------------------------------------------------------------ -----------
hardened-iis-on-windows-datacenter-2019           cognosys    hardened-iis-on-windows-datacenter-2019           cognosys:hardened-iis-on-windows-datacenter-2019:hardened-iis-on-windows-datacenter-2019:1.0.1                      1.0.1
  1. Create an image in your Blueprint using the obtained information.

compute:
  image:
    windows:
      publisher: cognosys
      product: hardened-iis-on-windows-datacenter-2019 
      sku: hardened-iis-on-windows-datacenter-2019

Last updated

Was this helpful?