turbot/aws_compliance

Query: redshift_cluster_encryption_in_transit_enabled

Usage

powerpipe query aws_compliance.query.redshift_cluster_encryption_in_transit_enabled

SQL

with pg_with_ssl as (
select
name as pg_name,
p ->> 'ParameterName' as parameter_name,
p ->> 'ParameterValue' as parameter_value
from
aws_redshift_parameter_group,
jsonb_array_elements(parameters) as p
where
p ->> 'ParameterName' = 'require_ssl'
and p ->> 'ParameterValue' = 'true'
)
select
arn as resource,
case
when cpg ->> 'ParameterGroupName' in (
select
pg_name
from
pg_with_ssl
) then 'ok'
else 'alarm'
end as status,
case
when cpg ->> 'ParameterGroupName' in (
select
pg_name
from
pg_with_ssl
) then title || ' encryption in transit enabled.'
else title || ' encryption in transit disabled.'
end as reason,
region,
account_id
from
aws_redshift_cluster,
jsonb_array_elements(cluster_parameter_groups) as cpg;

Controls

The query is being used by the following controls: