turbot/aws_compliance

Query: cloudtrail_trail_insight_selectors_and_logging_enabled

Usage

powerpipe query aws_compliance.query.cloudtrail_trail_insight_selectors_and_logging_enabled

Steampipe Tables

SQL

select
arn as resource,
case
when not is_logging then 'alarm'
when is_logging
and has_insight_selectors then 'ok'
else 'alarm'
end as status,
case
when not is_logging then title || ' logging is disabled.'
when is_logging
and has_insight_selectors then title || ' has insight selectors and logging enabled.'
else title || ' does not has insight selectors enabled.'
end as reason,
region,
account_id
from
aws_cloudtrail_trail
where
region = home_region;

Controls

The query is being used by the following controls: