From cc389f01d26bca069e949243b88eff28832349c4 Mon Sep 17 00:00:00 2001 From: Rhys Cox Date: Wed, 26 Aug 2026 07:58:55 +0100 Subject: [PATCH] CCM-23100: Added SQS alarm outputs for eventpub module --- infrastructure/terraform/modules/eventpub/README.md | 2 ++ .../terraform/modules/eventpub/module_sqs_queue.tf | 2 +- infrastructure/terraform/modules/eventpub/outputs.tf | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/infrastructure/terraform/modules/eventpub/README.md b/infrastructure/terraform/modules/eventpub/README.md index c91733e..8b7eee5 100644 --- a/infrastructure/terraform/modules/eventpub/README.md +++ b/infrastructure/terraform/modules/eventpub/README.md @@ -49,7 +49,9 @@ | [publishing\_anomaly\_alarm](#output\_publishing\_anomaly\_alarm) | CloudWatch anomaly detection alarm details for SNS publishing | | [s3\_bucket\_event\_cache](#output\_s3\_bucket\_event\_cache) | S3 Bucket ARN and Name for event cache | | [sns\_topic](#output\_sns\_topic) | SNS Topic ARN and Name | +| [sqs\_dlq\_messages\_alarm\_name](#output\_sqs\_dlq\_messages\_alarm\_name) | The name of the CloudWatch alarm for messages in the EventPub dead-letter queue | | [sqs\_queue](#output\_sqs\_queue) | EventPub SQS queue name, ARN, and DLQ details | +| [sqs\_queue\_oldest\_message\_alarm\_name](#output\_sqs\_queue\_oldest\_message\_alarm\_name) | The name of the CloudWatch alarm for oldest visible message age in the EventPub queue | diff --git a/infrastructure/terraform/modules/eventpub/module_sqs_queue.tf b/infrastructure/terraform/modules/eventpub/module_sqs_queue.tf index 39d0ebc..44d043d 100644 --- a/infrastructure/terraform/modules/eventpub/module_sqs_queue.tf +++ b/infrastructure/terraform/modules/eventpub/module_sqs_queue.tf @@ -1,5 +1,5 @@ module "sqs_queue" { - source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/3.1.4/terraform-sqs.zip" + source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/5.1.1/terraform-sqs.zip" aws_account_id = var.aws_account_id component = var.component diff --git a/infrastructure/terraform/modules/eventpub/outputs.tf b/infrastructure/terraform/modules/eventpub/outputs.tf index bca1f34..2f0b0bc 100644 --- a/infrastructure/terraform/modules/eventpub/outputs.tf +++ b/infrastructure/terraform/modules/eventpub/outputs.tf @@ -16,6 +16,16 @@ output "sqs_queue" { } } +output "sqs_dlq_messages_alarm_name" { + description = "The name of the CloudWatch alarm for messages in the EventPub dead-letter queue" + value = module.sqs_queue.sqs_dlq_messages_alarm_name +} + +output "sqs_queue_oldest_message_alarm_name" { + description = "The name of the CloudWatch alarm for oldest visible message age in the EventPub queue" + value = module.sqs_queue.sqs_queue_oldest_message_alarm_name +} + output "s3_bucket_event_cache" { description = "S3 Bucket ARN and Name for event cache" value = var.enable_event_cache ? {