turbot/ibm_insights

Query: ibm_is_vpc_by_size

Usage

powerpipe query ibm_insights.query.ibm_is_vpc_by_size

Steampipe Tables

SQL

with vpc_size as (
select
id,
a -> 'cidr' as cidr_block,
concat(
'/', masklen((a ->> 'cidr')::cidr),
' (', power(2, 32 - masklen((a ->> 'cidr')::cidr)), ')'
) as size
from
ibm_is_vpc,
jsonb_array_elements(address_prefixes) as a
)
select
size,
count(*)
from
vpc_size
group by
size;

Dashboards

The query is used in the dashboards: