Skip to content

Commit 3419a29

Browse files
committed
CCM-13476: allow configurable maxReceiveCount for queues
1 parent 63a9e72 commit 3419a29

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

infrastructure/modules/sqs/sqs_queue_redrive_policy.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ resource "aws_sqs_queue_redrive_policy" "redrive_policy" {
44
queue_url = aws_sqs_queue.sqs_queue.url
55
redrive_policy = jsonencode({
66
deadLetterTargetArn = aws_sqs_queue.deadletter_queue[0].arn
7-
maxReceiveCount = 3
7+
maxReceiveCount = var.max_receive_count
88
})
99
}

infrastructure/modules/sqs/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,9 @@ variable "create_dlq" {
116116
type = bool
117117
default = false
118118
}
119+
120+
variable "max_receive_count" {
121+
description = "The maximum number of times a message can be received before being sent to the DLQ"
122+
type = number
123+
default = 3
124+
}

0 commit comments

Comments
 (0)