turbot/terraform_aws_compliance

Query: vpc_network_acl_rule_restrict_ingress_ports_all

Usage

powerpipe query terraform_aws_compliance.query.vpc_network_acl_rule_restrict_ingress_ports_all

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std ->> 'egress') = 'true' then 'skip'
when (attributes_std ->> 'rule_action') = 'allow' and (attributes_std -> 'from_port') is null then 'alarm'
else 'ok'
end as status,
split_part(address, '.', 2) || case
when (attributes_std ->> 'egress') = 'true' then ' is egress rule'
when (attributes_std ->> 'rule_action') = 'allow' and (attributes_std -> 'from_port') is null then ' allows access to all ports'
else ' restricts access to all ports'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_network_acl_rule';

Controls

The query is being used by the following controls: