Control: ECS clusters should have container insights enabled
Description
This control checks if ECS clusters use Container Insights. This control fails if Container Insights are not set up for a cluster.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.ecs_cluster_container_insights_enabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.ecs_cluster_container_insights_enabled --share
SQL
This control uses a named query:
select cluster_arn as resource, case when s ->> 'Name' = 'containerInsights' and s ->> 'Value' = 'enabled' then 'ok' else 'alarm' end as status, case when s ->> 'Name' = 'containerInsights' and s ->> 'Value' = 'enabled' then title || ' Container Insights enabled.' else title || ' Container Insights disabled.' end as reason , region, account_idfrom aws_ecs_cluster as c, jsonb_array_elements(settings) as s;