turbot/aws_insights

Query: vpc_empty_status

Usage

powerpipe query aws_insights.query.vpc_empty_status

Steampipe Tables

SQL

with by_empty as (
select
distinct vpc.vpc_id,
case when s.subnet_id is null then 'empty' else 'non-empty' end as status
from
aws_vpc as vpc
left join aws_vpc_subnet as s on vpc.vpc_id = s.vpc_id
)
select
status,
count(*)
from
by_empty
group by
status;

Dashboards

The query is used in the dashboards: