Skip to content

Commit

Permalink
build(terraform): Remove Locals in KDS Module (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
jshlbrd committed Mar 21, 2024
1 parent a0ef232 commit 5ca6807
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions build/terraform/aws/kinesis_data_stream/main.tf
Original file line number Diff line number Diff line change
@@ -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" {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 5ca6807

Please sign in to comment.