turbot/azure_thrifty
Loading controls...

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_unattached

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run azure_thrifty.control.compute_disk_unattached --share

Steampipe 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 subscription
from
azure_compute_disk as disk,
azure_subscription as sub
where
sub.subscription_id = disk.subscription_id;

Tags