turbot/aws_compliance

Query: drs_job_enabled

Usage

powerpipe query aws_compliance.query.drs_job_enabled

Steampipe Tables

SQL

with drs_job_count as (
select
count(*) as count,
region,
account_id,
_ctx
from
aws_drs_job
group by
region,
account_id,
_ctx
)
select
'arn:' || r.partition || '::' || r.region || ':' || r.account_id as resource,
case
when drs_job_count.count = 0 or drs_job_count.count is null then 'alarm'
else 'ok'
end as status,
case
when drs_job_count.count = 0 or drs_job_count.count is null then 'DRS job not enabled for region ' || r.region || '.'
else 'DRS job enabled for region ' || r.region || '.'
end as reason
, drs_job_count.region, drs_job_count.account_id
from
aws_region as r
left join drs_job_count on r.region = drs_job_count.region;

Controls

The query is being used by the following controls: