turbot/terraform_aws_compliance

Query: redshift_cluster_automatic_snapshots_min_7_days

Usage

powerpipe query terraform_aws_compliance.query.redshift_cluster_automatic_snapshots_min_7_days

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std -> 'automated_snapshot_retention_period') is null then 'ok'
when (attributes_std -> 'automated_snapshot_retention_period')::integer > 7 then 'ok'
else 'alarm'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'automated_snapshot_retention_period') is null then ' ''automated_snapshot_retention_period'' set to 1 day by default'
when (attributes_std -> 'automated_snapshot_retention_period')::integer > 7 then ' ''automated_snapshot_retention_period'' set to ' || (attributes_std ->> 'automated_snapshot_retention_period')::integer || ' day(s)'
else ' ''automated_snapshot_retention_period'' set to 0 days'
end || '.' as reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_redshift_cluster';

Controls

The query is being used by the following controls: