Skip to content

Data Source: azurermSharedImageVersion

Use this data source to access information about an existing Version of a Shared Image within a Shared Image Gallery.

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.dataAzurermSharedImageVersion.DataAzurermSharedImageVersion(
  this,
  "example",
  {
    gallery_name: "my-image-gallery",
    image_name: "my-image",
    name: "1.0.0",
    resource_group_name: "example-resources",
  }
);

Argument Reference

The following arguments are supported:

  • name - The name of the Image Version.

\~> Note: You may specify latest to obtain the latest version or recent to obtain the most recently updated version.

  • imageName - The name of the Shared Image in which this Version exists.

  • galleryName - The name of the Shared Image Gallery in which the Shared Image exists.

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

  • sortVersionsBySemver - (Optional) Sort available versions taking SemVer versioning scheme into account. Defaults to false.

Attributes Reference

The following attributes are exported:

  • id - The ID of the Shared Image.

  • excludeFromLatest - Is this Image Version excluded from the latest filter?

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

  • managedImageId - The ID of the Managed Image which was the source of this Shared Image Version.

  • targetRegion - One or more targetRegion blocks as documented below.

  • osDiskSnapshotId - The ID of the OS disk snapshot which was the source of this Shared Image Version.

  • osDiskImageSizeGb - The size of the OS disk snapshot (in Gigabytes) which was the source of this Shared Image Version.

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


The targetRegion block exports the following:

  • name - The Azure Region in which this Image Version exists.

  • regionalReplicaCount - The number of replicas of the Image Version to be created per region.

  • storageAccountType - The storage account type for the image version.

Timeouts

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

  • read - (Defaults to 5 minutes) Used when retrieving the Version of a Shared Image within a Shared Image Gallery.