turbot/aws_compliance

Query: vpc_not_in_use

Usage

powerpipe query aws_compliance.query.vpc_not_in_use

Steampipe Tables

SQL

with vpc_without_subnet as (
select
distinct vpc_id
from
aws_vpc
where
vpc_id not in (select vpc_id from aws_vpc_subnet)
)
select
arn as resource,
case
when s.vpc_id is null then 'ok'
else 'alarm'
end as status,
case
when s.vpc_id is null then title || ' in use.'
else title || ' not in use.'
end as reason
, region, account_id
from
aws_vpc as v
left join vpc_without_subnet as s on s.vpc_id = v.vpc_id;

Controls

The query is being used by the following controls: