Skip to content

Data Source: azurermSnapshot

Use this data source to access information about an existing Snapshot.

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.dataAzurermSnapshot.DataAzurermSnapshot(this, "example", {
  name: "my-snapshot",
  resource_group_name: "my-resource-group",
});

Argument Reference

  • name - Specifies the name of the Snapshot.

  • resourceGroupName - Specifies the name of the resource group the Snapshot is located in.

Attributes Reference

  • id - The ID of the Snapshot.

  • createOption - How the snapshot was created.

  • sourceUri - The URI to a Managed or Unmanaged Disk.

  • sourceResourceId - The reference to an existing snapshot.

  • storageAccountId - The ID of an storage account.

  • diskSizeGb - The size of the Snapshotted Disk in GB.

  • trustedLaunchEnabled - Whether Trusted Launch is enabled for the Snapshot.

Timeouts

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

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