steampipe plugin install azuresteampipe plugin install azure

Table: azure_compute_disk

Azure Managed Disks are the new and recommended disk storage offering for use with Azure virtual machines for persistent storage of data.


List of all premium tier compute disks

sku_tier = 'Premium';

List of unattached disks

disk_state = 'Unattached';

Size and performance info of each disk

disk_size_gb as disk_size,
disk_iops_read_only as disk_iops_read_only,
disk_iops_read_write as provision_iops,
disk_iops_mbps_read_write as bandwidth,
disk_iops_mbps_read_only as disk_mbps_read_write

List of compute disks which are not available in multiple az

cross join jsonb_array_elements(zones) az
zones is not null;

List of compute disks which are not encrypted with customer key

encryption_type <> 'EncryptionAtRestWithCustomerKey';

.inspect azure_compute_disk

Azure Compute Disk

akasjsonbArray of globally unique identifier strings (also known as) for the resource.
creation_data_gallery_image_reference_idtextThe ARM id of the shared galley image version from which disk was created
creation_data_gallery_image_reference_lunbigintAn index that indicates which of the data disks in the image to use, if the disk is created from an image's data disk
creation_data_image_reference_idtextA relative uri containing either a Platform Image Repository or user image reference
creation_data_image_reference_lunbigintIf the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null
creation_data_optiontextThis enumerates the possible sources of a disk's creation
creation_data_source_resource_idtextThe ARM id of the source snapshot or disk
creation_data_source_unique_idtextAn unique id identifying the source of this resource
creation_data_source_uritextThe URI of a blob to be imported into a managed disk
creation_data_storage_account_idtextThe Azure Resource Manager identifier of the storage account containing the blob to import as a disk
creation_data_upload_size_bytesbigintThis is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer)
disk_access_idtextARM id of the DiskAccess resource for using private endpoints on disks
disk_iops_mbps_read_onlybigintThe total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10
disk_iops_mbps_read_writebigintThe bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10
disk_iops_read_onlydouble precisionThe total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes
disk_iops_read_writedouble precisionThe number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes
disk_size_bytesdouble precisionThe size of the disk in bytes
disk_size_gbbigintIf this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size
disk_statetextThis enumerates the possible state of the disk
encryption_disk_encryption_set_idtextResourceId of the disk encryption set to use for enabling encryption at rest
encryption_settings_collection_enabledbooleanShows the status of the encryption settings for the disk
encryption_settings_collection_settingsjsonbA collection of encryption settings, one for each disk volume
encryption_settings_collection_versiontextDescribes the type of encryption is used for the disks. '1.0' corresponds to Azure Disk Encryption with AAD app. '1.1' corresponds to Azure Disk Encryption
encryption_typetextThe type of key used to encrypt the data of the disk
hyper_v_generationtextThe hypervisor generation of the Virtual Machine. Applicable to OS disks only
idtextThe unique id identifying the resource in subscription
managed_bytextA relative URI containing the ID of the VM that has the disk attached
managed_by_extendedjsonbList of relative URIs containing the IDs of the VMs that have the disk attached
max_sharesbigintThe maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time
nametextName of the disk
network_access_policytextPolicy for accessing the disk via network
os_typetextThe Operating System type
provisioning_statetextThe disk provisioning state
regiontextThe Azure region/location in which the resource is located.
resource_grouptextThe resource group which holds this resource.
share_infojsonbDetails of the list of all VMs that have the disk attached
sku_nametextThe disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS
sku_tiertextThe sku tier
subscription_idtextThe Azure Subscription ID in which the resource is located.
tagsjsonbA map of tags for the resource.
time_createdtimestamp without time zoneThe time when the disk was created
titletextTitle of the resource.
typetextThe type of the resource in Azure
unique_idtextUnique Guid identifying the resource
zonesjsonbThe Logical zone list for Disk