Control: Unused disks should be removed
Description
Unattached disks are charged by Azure, they should be removed unless there is a business need to retain them.
Usage
Run the control in your terminal:
powerpipe control run azure_thrifty.control.compute_disk_unattachedSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_thrifty.control.compute_disk_unattached --shareSteampipe Tables
SQL
select  disk.id as resource,  case    when disk.disk_state = 'Unattached' then 'alarm'    else 'ok'  end as status,  case    when disk.disk_state = 'Unattached' then disk.title || ' has no attachments.'    else disk.title || ' has attachments.'  end as reason    , disk.resource_group  , display_name as subscriptionfrom  azure_compute_disk as disk,  azure_subscription as subwhere  sub.subscription_id = disk.subscription_id;