turbot/aws_insights

Query: cloudtrail_trail_logging_table

Usage

powerpipe query aws_insights.query.cloudtrail_trail_logging_table

SQL

select
t.name as "Name",
case when t.is_logging then 'Enabled' else null end as "Logging",
t.s3_bucket_name as "S3 Bucket Name",
t.s3_key_prefix as "S3 Key Prefix",
case when t.log_file_validation_enabled then 'Enabled' else null end as "Log File Validation",
t.start_logging_time as "Start Logging Time",
t.stop_logging_time as "Stop Logging Time",
a.title as "Account",
t.account_id as "Account ID",
t.region as "Region",
t.arn as "ARN"
from
aws_cloudtrail_trail as t,
aws_account as a
where
t.account_id = a.account_id
and t.region = t.home_region
order by
t.name;

Dashboards

The query is used in the dashboards: