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/terraform/modules/sqs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
| <a name="input_enable_queue_oldest_message_alarm"></a> [enable\_queue\_oldest\_message\_alarm](#input\_enable\_queue\_oldest\_message\_alarm) | Create a CloudWatch alarm when the oldest visible message age breaches the configured threshold on the main queue | `bool` | `true` | no |
| <a name="input_environment"></a> [environment](#input\_environment) | The name of the tfscaffold environment | `string` | n/a | yes |
| <a name="input_fifo_queue"></a> [fifo\_queue](#input\_fifo\_queue) | Boolean designating a FIFO queue | `bool` | `false` | no |
| <a name="input_high_throughput_fifo"></a> [high\_throughput\_fifo](#input\_high\_throughput\_fifo) | Enable high throughput mode for FIFO queues. Limits deduplication scope to message group. | `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 |
Expand Down
2 changes: 2 additions & 0 deletions infrastructure/terraform/modules/sqs/sqs_queue.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resource "aws_sqs_queue" "sqs_queue" {
delay_seconds = var.delay_seconds
fifo_queue = var.fifo_queue
content_based_deduplication = var.content_based_deduplication
deduplication_scope = var.fifo_queue && var.high_throughput_fifo ? "messageGroup" : null
fifo_throughput_limit = var.fifo_queue && var.high_throughput_fifo ? "perMessageGroupId" : null
max_message_size = var.max_message_size

kms_master_key_id = var.sqs_kms_key_arn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ resource "aws_sqs_queue" "deadletter_queue" {
visibility_timeout_seconds = var.visibility_timeout_seconds
fifo_queue = var.fifo_queue
content_based_deduplication = var.content_based_deduplication
deduplication_scope = var.fifo_queue && var.high_throughput_fifo ? "messageGroup" : null
fifo_throughput_limit = var.fifo_queue && var.high_throughput_fifo ? "perMessageGroupId" : null
max_message_size = var.max_message_size

kms_master_key_id = var.sqs_kms_key_arn
Expand Down
6 changes: 6 additions & 0 deletions infrastructure/terraform/modules/sqs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ variable "content_based_deduplication" {
default = false
}

variable "high_throughput_fifo" {
description = "Enable high throughput mode for FIFO queues. Limits deduplication scope to message group."
type = bool
default = false
}

variable "kms_data_key_reuse_period_seconds" {
description = "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)"
type = number
Expand Down