Skip to content

Commit 5196f52

Browse files
committed
Move static resources to infra - part 1
1 parent b648f83 commit 5196f52

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed
File renamed without changes.
File renamed without changes.

terraform/batch_processor_filter_lambda.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@ resource "aws_cloudwatch_log_metric_filter" "batch_processor_filter_error_logs"
306306
count = var.batch_error_notifications_enabled ? 1 : 0
307307

308308
name = "${local.short_prefix}-BatchProcessorFilterErrorLogsFilter"
309-
pattern = "%\\[ERROR\\]|\\[CRITICAL\\]%"
309+
# Ignore errors with the below exception type. This is an expected error which returns items to the queue
310+
pattern = "\"[ERROR]\" -EventAlreadyProcessingForSupplierAndVaccTypeError"
310311
log_group_name = aws_cloudwatch_log_group.batch_processor_filter_lambda_log_group.name
311312

312313
metric_transformation {
@@ -328,6 +329,6 @@ resource "aws_cloudwatch_metric_alarm" "batch_processor_filter_error_alarm" {
328329
statistic = "Sum"
329330
threshold = 1
330331
alarm_description = "This sets off an alarm for any error logs found in the batch processor filter Lambda function"
331-
alarm_actions = [aws_sns_topic.batch_processor_errors.arn]
332+
# alarm_actions = [data.aws_sns_topic.batch_processor_errors.arn]
332333
treat_missing_data = "notBreaching"
333334
}

terraform/ecs_batch_processor_config.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ resource "aws_cloudwatch_log_metric_filter" "record_processor_task_error_logs" {
362362
count = var.batch_error_notifications_enabled ? 1 : 0
363363

364364
name = "${local.short_prefix}-RecordProcessorTaskErrorLogsFilter"
365-
pattern = "%ERROR:|CRITICAL:%"
365+
pattern = "%ERROR:%"
366366
log_group_name = aws_cloudwatch_log_group.ecs_task_log_group.name
367367

368368
metric_transformation {
@@ -384,6 +384,6 @@ resource "aws_cloudwatch_metric_alarm" "record_processor_task_error_alarm" {
384384
statistic = "Sum"
385385
threshold = 1
386386
alarm_description = "This sets off an alarm for any error logs found in the record processor ECS task"
387-
alarm_actions = [aws_sns_topic.batch_processor_errors.arn]
387+
# alarm_actions = [data.aws_sns_topic.batch_processor_errors.arn]
388388
treat_missing_data = "notBreaching"
389389
}

terraform/file_name_processor.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ resource "aws_cloudwatch_log_metric_filter" "file_name_processor_error_logs" {
323323
count = var.batch_error_notifications_enabled ? 1 : 0
324324

325325
name = "${local.short_prefix}-FilenameProcessorErrorLogsFilter"
326-
pattern = "%\\[ERROR\\]|\\[CRITICAL\\]%"
326+
pattern = "%\\[ERROR\\]%"
327327
log_group_name = aws_cloudwatch_log_group.file_name_processor_log_group.name
328328

329329
metric_transformation {
@@ -345,6 +345,6 @@ resource "aws_cloudwatch_metric_alarm" "file_name_processor_error_alarm" {
345345
statistic = "Sum"
346346
threshold = 1
347347
alarm_description = "This sets off an alarm for any error logs found in the file name processor Lambda function"
348-
alarm_actions = [aws_sns_topic.batch_processor_errors.arn]
348+
# alarm_actions = [data.aws_sns_topic.batch_processor_errors.arn]
349349
treat_missing_data = "notBreaching"
350350
}

terraform/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,7 @@ data "aws_kms_key" "existing_id_sync_sqs_encryption_key" {
106106
data "aws_route53_zone" "project_zone" {
107107
name = local.project_domain_name
108108
}
109+
110+
# data "aws_sns_topic" "batch_processor_errors" {
111+
# name = "${var.environment}-batch-processor-errors"
112+
# }

0 commit comments

Comments
 (0)