Data Source: azurermManagedDisk
Use this data source to access information about an existing Managed Disk.
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 dataAzurermManagedDiskExisting =
new azurerm.dataAzurermManagedDisk.DataAzurermManagedDisk(this, "existing", {
name: "example-datadisk",
resource_group_name: "example-resources",
});
new cdktf.TerraformOutput(this, "id", {
value: dataAzurermManagedDiskExisting.id,
});
Argument Reference
-
name
- Specifies the name of the Managed Disk. -
resourceGroupName
- Specifies the name of the Resource Group where this Managed Disk exists.
Attributes Reference
-
diskEncryptionSetId
- The ID of the Disk Encryption Set used to encrypt this Managed Disk. -
diskIopsReadWrite
- The number of IOPS allowed for this disk, where one operation can transfer between 4k and 256k bytes. -
diskMbpsReadWrite
- The bandwidth allowed for this disk. -
diskSizeGb
- The size of the Managed Disk in gigabytes. -
imageReferenceId
- The ID of the source image used for creating this Managed Disk. -
osType
- The operating system used for this Managed Disk. -
storageAccountType
- The storage account type for the Managed Disk. -
sourceUri
- The Source URI for this Managed Disk. -
sourceResourceId
- The ID of an existing Managed Disk which this Disk was created from. -
storageAccountId
- The ID of the Storage Account where thesourceUri
is located. -
tags
- A mapping of tags assigned to the resource. -
zones
- A list of Availability Zones where the Managed Disk exists. -
networkAccessPolicy
- Policy for accessing the disk via network. -
diskAccessId
- The ID of the disk access resource for using private endpoints on disks. -
encryptionSettings
- AencryptionSettings
block as defined below.
The encryptionSettings
block supports:
-
diskEncryptionKey
- AdiskEncryptionKey
block as defined above. -
keyEncryptionKey
- AkeyEncryptionKey
block as defined below.
The diskEncryptionKey
block supports:
-
secretUrl
- The URL to the Key Vault Secret used as the Disk Encryption Key. -
sourceVaultId
- The ID of the source Key Vault.
The keyEncryptionKey
block supports:
-
keyUrl
- The URL to the Key Vault Key used as the Key Encryption Key. -
sourceVaultId
- The ID of the source Key Vault.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 5 minutes) Used when retrieving the Managed Disk.