Skip to content

Commit

Permalink
5809 batch alarms remove email subscription (#395)
Browse files Browse the repository at this point in the history
* 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] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
Wi11Shell and github-actions[bot] authored Oct 18, 2024
1 parent 4404b29 commit e82613e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
1 change: 0 additions & 1 deletion infra/terraform/modules/service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
| <a name="module_records"></a> [records](#module\_records) | terraform-aws-modules/route53/aws//modules/records | ~> 4.0 |
| <a name="module_route53_records"></a> [route53\_records](#module\_route53\_records) | terraform-aws-modules/acm/aws | ~> 5.0 |
| <a name="module_sns_batch_failure"></a> [sns\_batch\_failure](#module\_sns\_batch\_failure) | terraform-aws-modules/sns/aws | ~> 6.1 |
| <a name="module_sqs_deadletter"></a> [sqs\_deadletter](#module\_sqs\_deadletter) | terraform-aws-modules/sqs/aws | ~> 4.2.1 |

## Resources

Expand Down
24 changes: 5 additions & 19 deletions infra/terraform/modules/service/batch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
Expand Down Expand Up @@ -233,13 +232,13 @@ module "sns_batch_failure" {
}]
}
}

/*
subscriptions = {
"vol-app-${var.environment}-batch-failure-email" = {
protocol = "email"
endpoint = "[email protected]"
endpoint = ""
}
}
*/

tags = {
"Name" = "vol-app-${var.environment}-aws-sns-batch-failure"
Expand All @@ -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
Expand Down

0 comments on commit e82613e

Please sign in to comment.