Skip to content

Data Source: azurermImages

Use this data source to access information about existing Images within a Resource Group.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.dataAzurermImages.DataAzurermImages(this, "example", {
  resource_group_name: "example-resources",
});

Argument Reference

The following arguments are supported:

  • resourceGroupName - The name of the Resource Group in which the Image exists.

  • tagsFilter - A mapping of tags to filter the list of images against.

Attributes Reference

The following attributes are exported:

  • images - One or more images blocks as defined below:

A images block exports the following:

  • name - The name of the Image.

  • location - The supported Azure location where the Image exists.

  • zoneResilient - Is zone resiliency enabled?

  • osDisk - An osDisk block as defined below.

  • dataDisk - One or more dataDisk blocks as defined below.

  • tags - A mapping of tags assigned to the Image.


The osDisk block exports the following:

  • blobUri - the URI in Azure storage of the blob used to create the image.

  • caching - the caching mode for the OS Disk.

  • managedDiskId - the ID of the Managed Disk used as the OS Disk Image.

  • osState - the State of the OS used in the Image.

  • osType - the type of Operating System used on the OS Disk.

  • sizeGb - the size of the OS Disk in GB.


The dataDisk block exports the following:

  • blobUri - the URI in Azure storage of the blob used to create the image.

  • caching - the caching mode for the Data Disk.

  • lun - the logical unit number of the data disk.

  • managedDiskId - the ID of the Managed Disk used as the Data Disk Image.

  • sizeGb - the size of this Data Disk in GB.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • read - (Defaults to 5 minutes) Used when retrieving the Images within a Resource Group.