turbot/digitalocean_insights

Query: blockstorage_volume_by_droplet_attached

Usage

powerpipe query digitalocean_insights.query.blockstorage_volume_by_droplet_attached

Steampipe Tables

SQL

with volume as (
select
case
when jsonb_array_length(droplet_ids) = 0 then 'available'
else 'in-use'
end as droplet_attached
from
digitalocean_volume
)
select
droplet_attached,
count(*) as "Volume"
from
volume
group by
droplet_attached;

Dashboards

The query is used in the dashboards: