turbot/oci_insights

Query: blockstorage_block_volume_input

Usage

powerpipe query oci_insights.query.blockstorage_block_volume_input

SQL

select
b.display_name as label,
b.id as value,
json_build_object(
'b.id', right(reverse(split_part(reverse(b.id), '.', 1)), 8),
'b.region', region,
'oci.name', coalesce(oci.title, 'root'),
't.name', t.name
) as tags
from
oci_core_volume as b
left join oci_identity_compartment as oci on b.compartment_id = oci.id
left join oci_identity_tenancy as t on b.tenant_id = t.id
where
b.lifecycle_state <> 'TERMINATED'
order by
b.display_name;