diff --git a/build/terraform/aws/kinesis_data_stream/main.tf b/build/terraform/aws/kinesis_data_stream/main.tf index f47f6f67..000f5382 100644 --- a/build/terraform/aws/kinesis_data_stream/main.tf +++ b/build/terraform/aws/kinesis_data_stream/main.tf @@ -1,14 +1,3 @@ -locals { - # These are managed by the Autoscale application. - # https://github.com/brexhq/substation/blob/main/internal/aws/cloudwatch/cloudwatch.go - cw_alarm_ignore_changes = [ - "datapoints_to_alarm", - "evaluation_periods", - "threshold", - "metric_query", - ] -} - resource "random_uuid" "id" {} resource "aws_kinesis_stream" "stream" { @@ -103,7 +92,9 @@ resource "aws_cloudwatch_metric_alarm" "metric_alarm_downscale" { treat_missing_data = "ignore" lifecycle { - ignore_changes = local.cw_alarm_ignore_changes + # These are managed by the Autoscale application. + # https://github.com/brexhq/substation/blob/main/internal/aws/cloudwatch/cloudwatch.go + ignore_changes = [metric_query, datapoints_to_alarm, evaluation_periods, threshold] } metric_query { @@ -188,7 +179,9 @@ resource "aws_cloudwatch_metric_alarm" "metric_alarm_upscale" { treat_missing_data = "ignore" lifecycle { - ignore_changes = local.cw_alarm_ignore_changes + # These are managed by the Autoscale application. + # https://github.com/brexhq/substation/blob/main/internal/aws/cloudwatch/cloudwatch.go + ignore_changes = [metric_query, datapoints_to_alarm, evaluation_periods, threshold] } metric_query {