Skip to content

Commit 6a047d8

Browse files
committed
CCM-13638: configurable dlq retention period
1 parent 6d4f98f commit 6a047d8

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

infrastructure/modules/sqs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
| <a name="input_create_dlq"></a> [create\_dlq](#input\_create\_dlq) | Create a DLQ | `bool` | `false` | no |
1919
| <a name="input_default_tags"></a> [default\_tags](#input\_default\_tags) | A map of default tags to apply to all taggable resources within the component | `map(string)` | `{}` | no |
2020
| <a name="input_delay_seconds"></a> [delay\_seconds](#input\_delay\_seconds) | Time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes). | `number` | `0` | no |
21+
| <a name="input_dlq_message_retention_seconds"></a> [dlq\_message\_retention\_seconds](#input\_dlq\_message\_retention\_seconds) | The number of seconds Amazon SQS retains a message on the DLQ. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days) | `number` | `1209600` | no |
2122
| <a name="input_environment"></a> [environment](#input\_environment) | The name of the tfscaffold environment | `string` | n/a | yes |
2223
| <a name="input_fifo_queue"></a> [fifo\_queue](#input\_fifo\_queue) | Boolean designating a FIFO queue | `bool` | `false` | no |
2324
| <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 |

infrastructure/modules/sqs/sqs_queue_deadletter_queue.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ resource "aws_sqs_queue" "deadletter_queue" {
33

44
name = "${local.csi}-dlq${var.fifo_queue ? ".fifo" : ""}"
55

6-
message_retention_seconds = var.message_retention_seconds
6+
message_retention_seconds = var.dlq_message_retention_seconds
77
visibility_timeout_seconds = var.visibility_timeout_seconds
88
fifo_queue = var.fifo_queue
99
content_based_deduplication = var.content_based_deduplication

infrastructure/modules/sqs/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ variable "message_retention_seconds" {
6969
default = null
7070
}
7171

72+
variable "dlq_message_retention_seconds" {
73+
description = "The number of seconds Amazon SQS retains a message on the DLQ. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days)"
74+
type = number
75+
default = 1209600
76+
}
77+
7278
variable "visibility_timeout_seconds" {
7379
description = "The visibility timeout for the queue. An integer from 0 to 43200 (12 hours)"
7480
type = number

0 commit comments

Comments
 (0)