turbot/digitalocean_insights

Query: network_vpc_by_rfc1918_range

Usage

powerpipe query digitalocean_insights.query.network_vpc_by_rfc1918_range

Steampipe Tables

SQL

with cidr_buckets as (
select
id,
title,
ip_range as cidr,
case
when ip_range << = '10.0.0.0/8' :: cidr then '10.0.0.0/8'
when ip_range << = '172.16.0.0/12' :: cidr then '172.16.0.0/12'
when ip_range << = '192.168.0.0/16' :: cidr then '192.168.0.0/16'
else 'Public Range'
end as rfc1918_bucket
from
digitalocean_vpc
)
select
rfc1918_bucket,
count(*)
from
cidr_buckets
group by
rfc1918_bucket
order by
rfc1918_bucket

Dashboards

The query is used in the dashboards: