File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -260,11 +260,11 @@ resource "aws_cloudwatch_log_group" "mesh_file_converter_log_group" {
260260}
261261
262262resource "aws_cloudwatch_log_metric_filter" "mesh_processor_error_logs" {
263- count = var. error_alarm_notifications_enabled ? 1 : 0
263+ count = var. create_mesh_processor && var . error_alarm_notifications_enabled ? 1 : 0
264264
265265 name = " ${ local . short_prefix } -MeshProcessorErrorLogsFilter"
266266 pattern = " %\\ [ERROR\\ ]%"
267- log_group_name = aws_cloudwatch_log_group. mesh_file_converter_log_group [count . index ]. name
267+ log_group_name = aws_cloudwatch_log_group. mesh_file_converter_log_group [0 ]. name
268268
269269 metric_transformation {
270270 name = " ${ local . short_prefix } -MeshProcessorErrorLogs"
@@ -274,7 +274,7 @@ resource "aws_cloudwatch_log_metric_filter" "mesh_processor_error_logs" {
274274}
275275
276276resource "aws_cloudwatch_metric_alarm" "mesh_processor_error_alarm" {
277- count = var. error_alarm_notifications_enabled ? 1 : 0
277+ count = var. create_mesh_processor && var . error_alarm_notifications_enabled ? 1 : 0
278278
279279 alarm_name = " ${ local . short_prefix } -mesh-processor-lambda-error"
280280 comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -287,4 +287,4 @@ resource "aws_cloudwatch_metric_alarm" "mesh_processor_error_alarm" {
287287 alarm_description = " This sets off an alarm for any error logs found in the mesh processor Lambda function"
288288 alarm_actions = [data . aws_sns_topic . imms_system_alert_errors . arn ]
289289 treat_missing_data = " notBreaching"
290- }
290+ }
You can’t perform that action at this time.
0 commit comments