turbot/steampipe-mod-aws-compliance

Query: eks_cluster_control_plane_audit_logging_enabled

Usage

powerpipe query aws_compliance.query.eks_cluster_control_plane_audit_logging_enabled

Steampipe Tables

SQL

with control_panel_audit_logging as (
select
distinct arn,
log -> 'Types' as log_type
from
aws_eks_cluster,
jsonb_array_elements(logging -> 'ClusterLogging') as log
where
log ->> 'Enabled' = 'true'
and (log -> 'Types') @> '["audit"]'
)
select
c.arn as resource,
case
when l.arn is not null then 'ok'
else 'alarm'
end as status,
case
when l.arn is not null then title || ' control plane audit logging enabled.'
else title || ' control plane audit logging disabled.'
end as reason
, c.region, c.account_id
from
aws_eks_cluster as c
left join control_panel_audit_logging as l on l.arn = c.arn;

Controls

The query is being used by the following controls: