turbot/terraform_aws_compliance

Query: vpc_default_security_group_restricts_all_traffic

Usage

powerpipe query terraform_aws_compliance.query.vpc_default_security_group_restricts_all_traffic

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std -> 'egress') is null and (attributes_std -> 'ingress') is null then 'ok'
else 'alarm'
end as status,
case
when (attributes_std -> 'ingress') is not null and (attributes_std -> 'egress') is not null then 'Default security group ' || split_part(address, '.', 2) || ' has inbound and outbound rules'
when (attributes_std -> 'ingress') is not null and (attributes_std -> 'egress') is null then 'Default security group ' || split_part(address, '.', 2) || ' has inbound rules'
when (attributes_std -> 'ingress') is null and (attributes_std -> 'egress') is not null then 'Default security group ' || split_part(address, '.', 2) || ' has outbound rules'
else 'Default security group ' || split_part(address, '.', 2) || ' has no inbound or outbound rules'
end || '.' as reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_default_security_group';

Controls

The query is being used by the following controls: