turbot/guardrails_insights

Query: guardrails_activity_retention

Usage

powerpipe query guardrails_insights.query.guardrails_activity_retention

SQL

select
ws.workspace,
ps.id as resource,
case
when ps.value is null or ps.value = '' then 'alarm'
when ps.value = 'None' then 'alarm'
else 'ok'
end as status,
case
when ps.value is null or ps.value = '' then 'Policy recommendation not met'
when ps.value = 'None' then 'Policy recommendation not met'
else 'ok'
end as reason
from
(select distinct workspace from guardrails_policy_setting) ws
left join
guardrails_policy_setting ps
on
ws.workspace = ps.workspace
and ps.policy_type_uri = 'tmod:@turbot/turbot#/policy/types/activityRetention'
order by
ws.workspace;

Controls

The query is being used by the following controls: