turbot/aws_insights

Query: ec2_classic_load_balancers_for_acm_certificate

Usage

powerpipe query aws_insights.query.ec2_classic_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
clb.arn as clb_arn
from
aws_ec2_classic_load_balancer clb
join
certificate_usage cu on clb.arn = cu.in_use_arn;