turbot/aws_compliance

Query: vpc_peering_connection_no_cross_account_access

Usage

powerpipe query aws_compliance.query.vpc_peering_connection_no_cross_account_access

SQL

select
id as resource,
case
when status_code <> 'active' then 'alarm'
when requester_owner_id <> accepter_owner_id then 'alarm'
else 'ok'
end as status,
case
when status_code <> 'active' then title || ' is not in active state.'
when requester_owner_id <> accepter_owner_id then title || ' have cross account access.'
else title || ' does not have cross account access.'
end as reason
, region, account_id
from
aws_vpc_peering_connection;

Controls

The query is being used by the following controls: