From 5ca680799139f5e20c31df37ab4caaeb835d4e32 Mon Sep 17 00:00:00 2001 From: Josh Liburdi Date: Thu, 21 Mar 2024 07:35:43 -0700 Subject: [PATCH] build(terraform): Remove Locals in KDS Module (#149) --- .../terraform/aws/kinesis_data_stream/main.tf | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) 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 {