From 0de654bdd9fe0fc073385d4d8f0bd4d35f6ebffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Stru=C3=9F?= Date: Mon, 31 Jul 2023 15:39:54 +0200 Subject: [PATCH] feat: added delay_seconds --- README.md | 1 + main.tf | 1 + variables.tf | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/README.md b/README.md index d45185e..27b9857 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ Terraform module which creates a sqs queue | [aws\_account\_id](#input\_aws\_account\_id) | AWS account id | `string` | `null` | no | | [aws\_region](#input\_aws\_region) | AWS region | `string` | `null` | no | | [context](#input\_context) | Single object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables as `null` to use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional\_tag\_map, which are merged. | `any` |
{
"additional_tag_map": {},
"attributes": [],
"delimiter": null,
"descriptor_formats": {},
"enabled": true,
"environment": null,
"id_length_limit": null,
"label_key_case": null,
"label_order": [],
"label_value_case": null,
"labels_as_tags": [
"unset"
],
"name": null,
"namespace": null,
"regex_replace_chars": null,
"stage": null,
"tags": {},
"tenant": null
}
| no | +| [delay\_seconds](#input\_delay\_seconds) | The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes) | `number` | `null` | no | | [delimiter](#input\_delimiter) | Delimiter to be used between ID elements.
Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no | | [descriptor\_formats](#input\_descriptor\_formats) | Describe additional descriptors to be output in the `descriptors` output map.
Map of maps. Keys are names of descriptors. Values are maps of the form
`{
format = string
labels = list(string)
}`
(Type is `any` so the map values can later be enhanced to provide additional options.)
`format` is a Terraform format string to be passed to the `format()` function.
`labels` is a list of labels, in order, to pass to `format()` function.
Label values will be normalized before being passed to `format()` so they will be
identical to how they appear in `id`.
Default is `{}` (`descriptors` output will be empty). | `any` | `{}` | no | | [dlq\_enabled](#input\_dlq\_enabled) | Defines if Dead Letter Queue (DLQ) is enabled. | `bool` | `true` | no | diff --git a/main.tf b/main.tf index 2ed79c5..b71f53f 100644 --- a/main.tf +++ b/main.tf @@ -31,6 +31,7 @@ module "sqs" { create_dlq = var.dlq_enabled create_queue_policy = length(var.subscription) >= 1 + delay_seconds = var.delay_seconds fifo_queue = var.fifo_queue message_retention_seconds = var.message_retention_seconds name = module.this.id diff --git a/variables.tf b/variables.tf index cacd670..da3fb5c 100644 --- a/variables.tf +++ b/variables.tf @@ -23,6 +23,12 @@ variable "alarm_topic_arn" { default = null } +variable "delay_seconds" { + description = "The 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 = null +} + variable "dlq_enabled" { type = bool description = "Defines if Dead Letter Queue (DLQ) is enabled."