turbot/aws_insights

Query: wafv2_web_acls_for_cloudfront_distribution

Usage

powerpipe query aws_insights.query.wafv2_web_acls_for_cloudfront_distribution

SQL

with cloudfront_web_acl as (
select
web_acl_id
from
aws_cloudfront_distribution
where
arn = $1
and account_id = split_part($1,':',5)
)
select
waf.arn as wafv2_acl_arn
from
aws_wafv2_web_acl waf
join
cloudfront_web_acl cwa on waf.arn = cwa.web_acl_id
where
account_id = split_part($1,':',5);