Skip to content

Commit 59f2551

Browse files
feat: Add support for customizing DLQ FIFO throughput limit (#70)
* fix: add support for customizing dlq fifo throughput limit Signed-off-by: Aditya Menon <[email protected]> * chore: Remove redundant example --------- Signed-off-by: Aditya Menon <[email protected]> Co-authored-by: Bryant Biggs <[email protected]>
1 parent debb3cb commit 59f2551

File tree

5 files changed

+10
-2
lines changed

5 files changed

+10
-2
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.96.1
3+
rev: v1.98.0
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_wrapper_module_for_each

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ No modules.
211211
| <a name="input_dlq_content_based_deduplication"></a> [dlq\_content\_based\_deduplication](#input\_dlq\_content\_based\_deduplication) | Enables content-based deduplication for FIFO queues | `bool` | `null` | no |
212212
| <a name="input_dlq_deduplication_scope"></a> [dlq\_deduplication\_scope](#input\_dlq\_deduplication\_scope) | Specifies whether message deduplication occurs at the message group or queue level | `string` | `null` | no |
213213
| <a name="input_dlq_delay_seconds"></a> [dlq\_delay\_seconds](#input\_dlq\_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 |
214+
| <a name="input_dlq_fifo_throughput_limit"></a> [dlq\_fifo\_throughput\_limit](#input\_dlq\_fifo\_throughput\_limit) | Specifies whether the Dead Letter Queue FIFO queue throughput quota applies to the entire queue or per message group | `string` | `null` | no |
214215
| <a name="input_dlq_kms_data_key_reuse_period_seconds"></a> [dlq\_kms\_data\_key\_reuse\_period\_seconds](#input\_dlq\_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` | `null` | no |
215216
| <a name="input_dlq_kms_master_key_id"></a> [dlq\_kms\_master\_key\_id](#input\_dlq\_kms\_master\_key\_id) | The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK | `string` | `null` | no |
216217
| <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. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days) | `number` | `null` | no |

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ resource "aws_sqs_queue" "dlq" {
137137
delay_seconds = try(coalesce(var.dlq_delay_seconds, var.delay_seconds), null)
138138
# If source queue is FIFO, DLQ must also be FIFO and vice versa
139139
fifo_queue = var.fifo_queue
140-
fifo_throughput_limit = var.fifo_throughput_limit
140+
fifo_throughput_limit = try(coalesce(var.dlq_fifo_throughput_limit, var.fifo_throughput_limit), null)
141141
kms_data_key_reuse_period_seconds = try(coalesce(var.dlq_kms_data_key_reuse_period_seconds, var.kms_data_key_reuse_period_seconds), null)
142142
kms_master_key_id = local.dlq_kms_master_key_id
143143
max_message_size = var.max_message_size

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ variable "dlq_sqs_managed_sse_enabled" {
214214
default = true
215215
}
216216

217+
variable "dlq_fifo_throughput_limit" {
218+
description = "Specifies whether the Dead Letter Queue FIFO queue throughput quota applies to the entire queue or per message group"
219+
type = string
220+
default = null
221+
}
222+
217223
variable "dlq_visibility_timeout_seconds" {
218224
description = "The visibility timeout for the queue. An integer from 0 to 43200 (12 hours)"
219225
type = number

wrappers/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module "wrapper" {
1414
dlq_content_based_deduplication = try(each.value.dlq_content_based_deduplication, var.defaults.dlq_content_based_deduplication, null)
1515
dlq_deduplication_scope = try(each.value.dlq_deduplication_scope, var.defaults.dlq_deduplication_scope, null)
1616
dlq_delay_seconds = try(each.value.dlq_delay_seconds, var.defaults.dlq_delay_seconds, null)
17+
dlq_fifo_throughput_limit = try(each.value.dlq_fifo_throughput_limit, var.defaults.dlq_fifo_throughput_limit, null)
1718
dlq_kms_data_key_reuse_period_seconds = try(each.value.dlq_kms_data_key_reuse_period_seconds, var.defaults.dlq_kms_data_key_reuse_period_seconds, null)
1819
dlq_kms_master_key_id = try(each.value.dlq_kms_master_key_id, var.defaults.dlq_kms_master_key_id, null)
1920
dlq_message_retention_seconds = try(each.value.dlq_message_retention_seconds, var.defaults.dlq_message_retention_seconds, null)

0 commit comments

Comments
 (0)