turbot/terraform_aws_compliance

Query: cloudwatch_alarm_action_enabled

Usage

powerpipe query terraform_aws_compliance.query.cloudwatch_alarm_action_enabled

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std -> 'alarm_actions') is null
and (attributes_std -> 'insufficient_data_actions') is null
and (attributes_std -> 'ok_actions') is null then 'alarm'
else 'ok'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'alarm_actions') is null
and (attributes_std -> 'insufficient_data_actions') is null
and (attributes_std -> 'ok_actions') is null then ' no action enabled'
when (attributes_std -> 'alarm_actions') is not null then ' alarm action enabled'
when (attributes_std -> 'insufficient_data_actions') is not null then ' insufficient data action enabled.'
when (attributes_std -> 'ok_actions') is not null then ' ok action enabled.'
else ' action enabled'
end || '.' reason,
path || ':' || start_line
from
terraform_resource
where
type = 'aws_cloudwatch_metric_alarm';

Controls

The query is being used by the following controls: