From 516adeb4313f16ceb9f0d56c8ae55ef6a31c01e0 Mon Sep 17 00:00:00 2001 From: Ranika Madurawe Date: Wed, 20 Nov 2024 00:55:50 +0530 Subject: [PATCH] Add ignore changes --- modules/aws/Custom-AKS-Application-Log-Alarm/log_alarm.tf | 6 ++++++ modules/aws/Custom-Metric-Alarm/metric_alarm.tf | 6 ++++++ modules/aws/Metric-Alarm/metric_alarm.tf | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/modules/aws/Custom-AKS-Application-Log-Alarm/log_alarm.tf b/modules/aws/Custom-AKS-Application-Log-Alarm/log_alarm.tf index 5da1662..9acef5a 100644 --- a/modules/aws/Custom-AKS-Application-Log-Alarm/log_alarm.tf +++ b/modules/aws/Custom-AKS-Application-Log-Alarm/log_alarm.tf @@ -43,4 +43,10 @@ resource "aws_cloudwatch_metric_alarm" "metric_alarm" { statistic = "Sum" tags = var.tags + + lifecycle { + ignore_changes = [ + datapoints_to_alarm + ] + } } diff --git a/modules/aws/Custom-Metric-Alarm/metric_alarm.tf b/modules/aws/Custom-Metric-Alarm/metric_alarm.tf index f369367..b16f2f4 100644 --- a/modules/aws/Custom-Metric-Alarm/metric_alarm.tf +++ b/modules/aws/Custom-Metric-Alarm/metric_alarm.tf @@ -50,4 +50,10 @@ resource "aws_cloudwatch_metric_alarm" "metric_alarm" { } } tags = var.tags + + lifecycle { + ignore_changes = [ + datapoints_to_alarm + ] + } } diff --git a/modules/aws/Metric-Alarm/metric_alarm.tf b/modules/aws/Metric-Alarm/metric_alarm.tf index 61ea55e..a9091ae 100644 --- a/modules/aws/Metric-Alarm/metric_alarm.tf +++ b/modules/aws/Metric-Alarm/metric_alarm.tf @@ -33,4 +33,10 @@ resource "aws_cloudwatch_metric_alarm" "metric_alarm" { dimensions = var.dimensions tags = var.tags + + lifecycle { + ignore_changes = [ + datapoints_to_alarm + ] + } }