turbot/aws_insights

Query: ebs_volume_attached_instances_count

Usage

powerpipe query aws_insights.query.ebs_volume_attached_instances_count

Steampipe Tables

SQL

select
'Attached Instances' as label,
case
when jsonb_array_length(attachments) = 0 then 0
else jsonb_array_length(attachments)
end as value,
case
when jsonb_array_length(attachments) > 0 then 'ok'
else 'alert'
end as "type"
from
aws_ebs_volume
where
arn = $1
and account_id = split_part($1, ':', 5)
and region = split_part($1, ':', 4);

Dashboards

The query is used in the dashboards: