turbot/aws_compliance

Query: ecs_task_definition_logging_enabled

Usage

powerpipe query aws_compliance.query.ecs_task_definition_logging_enabled

Steampipe Tables

SQL

with task_definitions_logging_enabled as (
select
distinct task_definition_arn as arn
from
aws_ecs_task_definition,
jsonb_array_elements(container_definitions) as c
where
c ->> 'LogConfiguration' is not null
)
select
a.task_definition_arn as resource,
case
when b.arn is not null then 'ok'
else 'alarm'
end as status,
case
when b.arn is not null then a.title || ' logging enabled.'
else a.title || ' logging disabled.'
end as reason
, region, account_id
from
aws_ecs_task_definition as a
left join task_definitions_logging_enabled as b on a.task_definition_arn = b.arn;

Controls

The query is being used by the following controls: