turbot/aws_compliance

Query: docdb_cluster_snapshot_restrict_public_access

Usage

powerpipe query aws_compliance.query.docdb_cluster_snapshot_restrict_public_access

SQL

select
arn as resource,
case
when (cluster_snapshot ->> 'AttributeName' = 'restore') and cluster_snapshot -> 'AttributeValues' = '["all"]' then 'alarm'
else 'ok'
end status,
case
when (cluster_snapshot ->> 'AttributeName' = 'restore') and cluster_snapshot -> 'AttributeValues' = '["all"]' then title || ' does not restrict public access.'
else title || ' restrict public access.'
end reason
, region, account_id
from
aws_docdb_cluster_snapshot,
jsonb_array_elements(db_cluster_snapshot_attributes) as cluster_snapshot;

Controls

The query is being used by the following controls: