Skip to content

Data Source: azurermPlatformImage

Use this data source to access information about a Platform Image.

Example Usage

import * as cdktf from "cdktf";
/*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.*/
const dataAzurermPlatformImageExample =
  new azurerm.dataAzurermPlatformImage.DataAzurermPlatformImage(
    this,
    "example",
    {
      location: "West Europe",
      offer: "UbuntuServer",
      publisher: "Canonical",
      sku: "16.04-LTS",
    }
  );
new cdktf.TerraformOutput(this, "id", {
  value: dataAzurermPlatformImageExample.id,
});

Argument Reference

  • location - (Required) Specifies the Location to pull information about this Platform Image from.

  • publisher - (Required) Specifies the Publisher associated with the Platform Image.

  • offer - (Required) Specifies the Offer associated with the Platform Image.

  • sku - (Required) Specifies the SKU of the Platform Image.

  • version - (Optional) The version of the Platform Image.

Attributes Reference

  • id - The ID of the Platform Image.

Timeouts

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

  • read - (Defaults to 5 minutes) Used when retrieving the Platform Image.