turbot/oci_insights

Query: blockstorage_block_volume_unattached_count

Usage

powerpipe query oci_insights.query.blockstorage_block_volume_unattached_count

SQL

select
count(*) as value,
'Unattached' as label,
case count(*) when 0 then 'ok' else 'alert' end as type
from
oci_core_volume
where
id not in (
select
volume_id
from
oci_core_volume_attachment
) and lifecycle_state <> 'TERMINATED';

Dashboards

The query is used in the dashboards: