diff --git a/infrastructure/modules/sqs/README.md b/infrastructure/modules/sqs/README.md index b3e0a86..2e83262 100644 --- a/infrastructure/modules/sqs/README.md +++ b/infrastructure/modules/sqs/README.md @@ -17,6 +17,7 @@ | [content\_based\_deduplication](#input\_content\_based\_deduplication) | Enables content-based deduplication for FIFO queues | `bool` | `false` | no | | [create\_dlq](#input\_create\_dlq) | Create a DLQ | `bool` | `false` | no | | [default\_tags](#input\_default\_tags) | A map of default tags to apply to all taggable resources within the component | `map(string)` | `{}` | no | +| [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 | | [environment](#input\_environment) | The name of the tfscaffold environment | `string` | n/a | yes | | [fifo\_queue](#input\_fifo\_queue) | Boolean designating a FIFO queue | `bool` | `false` | no | | [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 | diff --git a/infrastructure/modules/sqs/sqs_queue.tf b/infrastructure/modules/sqs/sqs_queue.tf index 1a9817c..6986283 100644 --- a/infrastructure/modules/sqs/sqs_queue.tf +++ b/infrastructure/modules/sqs/sqs_queue.tf @@ -3,6 +3,7 @@ resource "aws_sqs_queue" "sqs_queue" { message_retention_seconds = var.message_retention_seconds visibility_timeout_seconds = var.visibility_timeout_seconds + delay_seconds = var.delay_seconds fifo_queue = var.fifo_queue content_based_deduplication = var.content_based_deduplication max_message_size = var.max_message_size diff --git a/infrastructure/modules/sqs/variables.tf b/infrastructure/modules/sqs/variables.tf index 5dc18c1..56ae762 100644 --- a/infrastructure/modules/sqs/variables.tf +++ b/infrastructure/modules/sqs/variables.tf @@ -81,6 +81,12 @@ variable "visibility_timeout_seconds" { default = 300 } +variable "delay_seconds" { + description = "Time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes)." + type = number + default = 0 +} + variable "fifo_queue" { description = "Boolean designating a FIFO queue" type = bool