Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5809 batch alarms remove email subscription #395

Merged
merged 11 commits into from
Oct 18, 2024
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