turbot/aws_compliance

Query: cloudfront_distribution_geo_restrictions_enabled

Usage

powerpipe query aws_compliance.query.cloudfront_distribution_geo_restrictions_enabled

SQL

select
arn as resource,
case
when restrictions -> 'GeoRestriction' ->> 'RestrictionType' = 'none' then 'alarm'
else 'ok'
end as status,
case
when restrictions -> 'GeoRestriction' ->> 'RestrictionType' = 'none' then title || ' Geo Restriction disabled.'
else title || ' Geo Restriction enabled.'
end as reason
, region, account_id
from
aws_cloudfront_distribution;

Controls

The query is being used by the following controls: