turbot/aws_insights

Query: vpc_security_group_egress_rules

Usage

powerpipe query aws_insights.query.vpc_security_group_egress_rules

SQL

select
concat(text(cidr_ipv4), text(cidr_ipv6), referenced_group_id, referenced_vpc_id,prefix_list_id) as "Destination",
security_group_rule_id as "Security Group Rule ID",
case
when ip_protocol = '-1' then 'All Traffic'
when ip_protocol = 'icmp' then 'All ICMP'
else ip_protocol
end as "Protocol",
case
when from_port = -1 then 'All'
when from_port is not null
and to_port is not null
and from_port = to_port then from_port::text
else concat(
from_port,
'-',
to_port
)
end as "Ports"
from
aws_vpc_security_group_rule
where
group_id = $1
and is_egress

Dashboards

The query is used in the dashboards: