turbot/azure_insights

Query: compute_virtual_machine_data_disks

Usage

powerpipe query azure_insights.query.compute_virtual_machine_data_disks

SQL

select
disk ->> 'name' as "Name",
disk ->> 'caching' as "Caching",
disk ->> 'createOption' as "Create Option",
(disk ->> 'toBeDetached')::boolean as "To Be Detached",
(disk ->> 'writeAcceleratorEnabled')::boolean as "Write Accelerator Enabled",
lower(disk -> 'managedDisk' ->> 'id') as "Managed Disk ID"
from
azure_compute_virtual_machine,
jsonb_array_elements(data_disks) as disk
where
lower(id) = $1
and subscription_id = split_part($1, '/', 3);

Dashboards

The query is used in the dashboards: