turbot/aws_insights

Query: ec2_network_load_balancers_for_acm_certificate

Usage

powerpipe query aws_insights.query.ec2_network_load_balancers_for_acm_certificate

SQL

with certificate_usage as (
select
jsonb_array_elements_text(in_use_by) as in_use_arn
from
aws_acm_certificate
where
account_id = split_part($1, ':', 5)
and region = split_part($1, ':', 4)
and certificate_arn = $1
)
select
nlb.arn as nlb_arn
from
aws_ec2_network_load_balancer nlb
join
certificate_usage cu on nlb.arn = cu.in_use_arn;