From e82613e9d95cbb40d98536006a3a38280b561745 Mon Sep 17 00:00:00 2001 From: William Shelley Date: Fri, 18 Oct 2024 09:39:41 +0100 Subject: [PATCH] 5809 batch alarms remove email subscription (#395) * fix: batch rule names * docs: update Terraform docs * fix: add name to targets * docs: update Terraform docs * fix: more event renaming * fix: used dlq module * fix: updated queue arn * docs: update Terraform docs * fix: sqs module version * fix: remove email subscription and dlq * docs: update Terraform docs --------- Co-authored-by: github-actions[bot] --- infra/terraform/modules/service/README.md | 1 - infra/terraform/modules/service/batch.tf | 24 +++++------------------ 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/infra/terraform/modules/service/README.md b/infra/terraform/modules/service/README.md index 007a605df2..a86897cdee 100644 --- a/infra/terraform/modules/service/README.md +++ b/infra/terraform/modules/service/README.md @@ -27,7 +27,6 @@ | [records](#module\_records) | terraform-aws-modules/route53/aws//modules/records | ~> 4.0 | | [route53\_records](#module\_route53\_records) | terraform-aws-modules/acm/aws | ~> 5.0 | | [sns\_batch\_failure](#module\_sns\_batch\_failure) | terraform-aws-modules/sns/aws | ~> 6.1 | -| [sqs\_deadletter](#module\_sqs\_deadletter) | terraform-aws-modules/sqs/aws | ~> 4.2.1 | ## Resources diff --git a/infra/terraform/modules/service/batch.tf b/infra/terraform/modules/service/batch.tf index f0689702bc..1be00905b2 100644 --- a/infra/terraform/modules/service/batch.tf +++ b/infra/terraform/modules/service/batch.tf @@ -190,9 +190,8 @@ module "eventbridge_sns" { targets = { "vol-app-${var.environment}-batch-failure-event" = [ { - name = "batch-fail-event" - arn = module.sns_batch_failure.topic_arn - dead_letter_arn = module.sqs_deadletter.queue_arn + name = "batch-fail-event" + arn = module.sns_batch_failure.topic_arn } ] } @@ -233,13 +232,13 @@ module "sns_batch_failure" { }] } } - + /* subscriptions = { "vol-app-${var.environment}-batch-failure-email" = { protocol = "email" - endpoint = "william.shelley@dvsa.gov.uk" + endpoint = "" } - } + */ tags = { "Name" = "vol-app-${var.environment}-aws-sns-batch-failure" @@ -248,19 +247,6 @@ module "sns_batch_failure" { } -module "sqs_deadletter" { - version = "~> 4.2.1" - source = "terraform-aws-modules/sqs/aws" - - name = "vol-app-${var.environment}-batch-failure-queue" - - create_dlq = true - redrive_policy = { - # default is 5 for this module - maxReceiveCount = 10 - } -} - resource "aws_cloudwatch_log_group" "this" { name = "/aws/batch/vol-app-${var.environment}" retention_in_days = 1