Skip to main content
Providers

ManagedDisk

A resource of the Azure provider, version 0.3.0, in its Storage group. Import it with:

import ManagedDisk from "azure/storage"

Example

resource ManagedDisk example {
    name                = "example-value"
    resourceGroup       = "example-value"
    location            = "example-value"
    size                = 3.14
    sku                 = "StandardSSD_LRS"
    tier                = "example-value"
    diskIops            = 3.14
    diskMbps            = 3.14
    osType              = "Linux"
    sourceResourceId    = "example-value"
    sourceUri           = "example-value"
    storageAccountId    = "example-value"
    zone                = "example-value"
    burstingEnabled     = false
    networkAccessPolicy = "AllowAll"
    diskAccessId        = "example-value"
    tags                = "..."
}

Properties

Set by your code in the resource block. A required one must be set; any other you leave out takes the value under Default, if it has one.

NameTypeDefaultRequiredDescription
namestring—NoThe name of the managed disk
resourceGroupstring—NoThe Azure resource group name
locationstring—NoThe Azure region/location (e.g., eastus, westeurope)
sizenumber—NoThe size of the disk in GB
skustring"StandardSSD_LRS"NoThe disk SKU (storage type) Allowed: "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS", "StandardSSD_ZRS"
tierstring—NoThe disk tier for Premium and Ultra disks (e.g., P30, P40, P50)
diskIopsnumber—NoThe IOPS read/write budget for Ultra disks (100 - 160,000)
diskMbpsnumber—NoThe throughput in MB/s for Ultra disks (1 - 2,000)
osTypestring—NoThe operating system type if this is an OS disk Allowed: "Linux", "Windows"
sourceResourceIdstring—NoThe source resource ID to create the disk from (snapshot, image, or disk)
sourceUristring—NoThe source URI for importing a VHD from a storage account
storageAccountIdstring—NoThe storage account ID where sourceUri is located
zonestring—NoThe availability zone for the disk (1, 2, or 3)
burstingEnabledbooleanfalseNoEnable bursting for Premium SSD disks > 512 GB
networkAccessPolicystring"AllowAll"NoNetwork access policy for the disk Allowed: "AllowAll", "AllowPrivate", "DenyAll"
diskAccessIdstring—NoThe disk access ID for private endpoint connections
tagsobject—NoTags to apply to the disk

Set by Azure after the resource is created: your code can read them but not set them. An importable one identifies an existing resource.

NameTypeImportableDescription
idstringYesThe Azure resource ID of the disk
provisioningStatestringNoThe provisioning state of the disk
diskStatestringNoThe disk state (Unattached, Attached, Reserved, etc.)
uniqueIdstringNoThe unique identifier for the disk
timeCreatedstringNoThe time the disk was created
managedBystringNoThe ID of the VM this disk is attached to

On this page