turbot/steampipe-mod-aws-compliance

Query: connect_instance_logging_enabled

Usage

powerpipe query aws_compliance.query.connect_instance_logging_enabled

SQL

with contactflow_logs_attribute as (
select
concat('arn:', a.partition, ':connect:', a.region, ':', a.account_id, ':instance/', a.instance_id) as instance_id
from
aws_connect_instance as i
left join aws_connect_instance_attribute as a on i.arn = concat('arn:', a.partition, ':connect:', a.region, ':', a.account_id, ':instance/', a.instance_id)
where
attribute_type = 'CONTACTFLOW_LOGS'
and value = 'true'
)
select
arn as resource,
case
when a.instance_id is not null then 'ok'
else 'alarm'
end as status,
case
when a.instance_id is not null then title || ' logging enabled.'
else title || ' logging disabled.'
end as reason
, region, account_id
from
aws_connect_instance as i
left join contactflow_logs_attribute as a on a.instance_id = i.arn;

Controls

The query is being used by the following controls: