turbot/steampipe-mod-terraform-aws-compliance

Control: Config aggregator should be enabled in all regions

Description

AWS Config should enable the config aggregator - allowing you to analyze the configuration across multiple accounts and regions.

Usage

Run the control in your terminal:

powerpipe control run terraform_aws_compliance.control.config_aggregator_enabled_all_regions

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run terraform_aws_compliance.control.config_aggregator_enabled_all_regions --share

SQL

This control uses a named query:

select
address as resource,
case
when (attributes_std -> 'account_aggregation_source' ->> 'all_regions')::boolean then 'ok'
else 'ok'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'account_aggregation_source' ->> 'all_regions')::boolean then ' enabled in all regions'
else ' not enabled in all regions'
end || '.' as reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_config_configuration_aggregator';

Tags