turbot/azure

steampipe plugin install azuresteampipe plugin install azure
azure_ad_groupazure_ad_service_principalazure_ad_userazure_api_managementazure_app_service_environmentazure_app_service_function_appazure_app_service_planazure_app_service_web_appazure_application_security_groupazure_compute_availability_setazure_compute_diskazure_compute_disk_encryption_setazure_compute_disk_metric_read_opsazure_compute_disk_metric_read_ops_dailyazure_compute_disk_metric_read_ops_hourlyazure_compute_disk_metric_write_opsazure_compute_disk_metric_write_ops_dailyazure_compute_disk_metric_write_ops_hourlyazure_compute_imageazure_compute_resource_skuazure_compute_snapshotazure_compute_virtual_machineazure_compute_virtual_machine_metric_cpu_utilizationazure_compute_virtual_machine_metric_cpu_utilization_dailyazure_compute_virtual_machine_metric_cpu_utilization_hourlyazure_cosmosdb_accountazure_cosmosdb_mongo_databaseazure_cosmosdb_sql_databaseazure_data_factoryazure_data_factory_datasetazure_data_factory_pipelineazure_diagnostic_settingazure_express_route_circuitazure_firewallazure_key_vaultazure_key_vault_keyazure_key_vault_secretazure_kubernetes_clusterazure_locationazure_log_alertazure_log_profileazure_management_lockazure_mysql_serverazure_network_interfaceazure_network_security_groupazure_network_watcherazure_network_watcher_flow_logazure_policy_assignmentazure_policy_definitionazure_postgresql_serverazure_providerazure_public_ipazure_resource_groupazure_role_assignmentazure_role_definitionazure_route_tableazure_security_center_auto_provisioningazure_security_center_contactazure_security_center_settingazure_security_center_subscription_pricingazure_sql_databaseazure_sql_serverazure_storage_accountazure_storage_blobazure_storage_blob_serviceazure_storage_containerazure_storage_queueazure_storage_tableazure_storage_table_serviceazure_subnetazure_subscriptionazure_tenantazure_virtual_networkazure_virtual_network_gateway

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.

Examples

List of all premium tier compute disks

select
name,
sku_name,
sku_tier
from
azure_compute_disk
where
sku_tier = 'Premium';

List of unattached disks

select
name,
disk_state
from
azure_compute_disk
where
disk_state = 'Unattached';

Size and performance info of each disk

select
name,
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
from
azure_compute_disk;

List of compute disks which are not available in multiple az

select
name,
az,
region
from
azure_compute_disk
cross join jsonb_array_elements(zones) az
where
zones is not null;

List of compute disks which are not encrypted with customer key

select
name,
encryption_type
from
azure_compute_disk
where
encryption_type <> 'EncryptionAtRestWithCustomerKey';

.inspect azure_compute_disk

Azure Compute Disk

NameTypeDescription
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