Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions infrastructure/modules/sqs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
| <a name="input_fifo_queue"></a> [fifo\_queue](#input\_fifo\_queue) | Boolean designating a FIFO queue | `bool` | `false` | no |
| <a name="input_kms_data_key_reuse_period_seconds"></a> [kms\_data\_key\_reuse\_period\_seconds](#input\_kms\_data\_key\_reuse\_period\_seconds) | The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours) | `number` | `300` | no |
| <a name="input_max_message_size"></a> [max\_message\_size](#input\_max\_message\_size) | The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB) | `number` | `262144` | no |
| <a name="input_max_receive_count"></a> [max\_receive\_count](#input\_max\_receive\_count) | The maximum number of times a message can be received before being sent to the DLQ | `number` | `3` | no |
| <a name="input_message_retention_seconds"></a> [message\_retention\_seconds](#input\_message\_retention\_seconds) | The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days) | `number` | `null` | no |
| <a name="input_name"></a> [name](#input\_name) | Name of the SQS Queue | `string` | n/a | yes |
| <a name="input_project"></a> [project](#input\_project) | The name of the tfscaffold project | `string` | n/a | yes |
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/modules/sqs/sqs_queue_redrive_policy.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ resource "aws_sqs_queue_redrive_policy" "redrive_policy" {
queue_url = aws_sqs_queue.sqs_queue.url
redrive_policy = jsonencode({
deadLetterTargetArn = aws_sqs_queue.deadletter_queue[0].arn
maxReceiveCount = 3
maxReceiveCount = var.max_receive_count
})
}
6 changes: 6 additions & 0 deletions infrastructure/modules/sqs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,9 @@ variable "create_dlq" {
type = bool
default = false
}

variable "max_receive_count" {
description = "The maximum number of times a message can be received before being sent to the DLQ"
type = number
default = 3
}
Loading