turbot/aws_insights

Query: vpc_subnets_for_ec2_application_load_balancer

Usage

powerpipe query aws_insights.query.vpc_subnets_for_ec2_application_load_balancer

SQL

select
s.subnet_id as subnet_id
from
aws_vpc_subnet s,
aws_ec2_application_load_balancer as alb,
jsonb_array_elements(availability_zones) as az
where
alb.arn = $1
and s.subnet_id = az ->> 'SubnetId';