Use this data source to access information about an existing Snapshot.
data "azurerm_snapshot" "example" {
name = "my-snapshot"
resource_group_name = "my-resource-group"
}
name
- Specifies the name of the Snapshot.
resource_group_name
- Specifies the name of the resource group the Snapshot is located in.
id
- The ID of the Snapshot.
create_option
- How the snapshot was created.
source_uri
- The URI to a Managed or Unmanaged Disk.
source_resource_id
- The reference to an existing snapshot.
storage_account_id
- The ID of an storage account.
disk_size_gb
- The size of the Snapshotted Disk in GB.
trusted_launch_enabled
- Whether Trusted Launch is enabled for the Snapshot.
The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 5 minutes) Used when retrieving the Snapshot.