turbot/aws_insights

Query: ec2_network_interface_private_ip

Usage

powerpipe query aws_insights.query.ec2_network_interface_private_ip

SQL

select
pvt_ip_addr ->> 'PrivateIpAddress' as "IP Address",
pvt_ip_addr ->> 'Primary' as "Primary"
from
aws_ec2_network_interface eni,
jsonb_array_elements(eni.private_ip_addresses) as pvt_ip_addr
where
eni.network_interface_id = $1
order by
-- primary first
pvt_ip_addr ->> 'Primary' desc

Dashboards

The query is used in the dashboards: