Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

umotif-public/terraform-aws-sqs

Repository files navigation

GitHub release (latest SemVer)

terraform-aws-sqs

Terraform module which creates Simple Queue Service(SQS) resources in AWS

Terraform versions

Terraform 1.0.0. Pin module version to ~> v1.0. Submit pull-requests to main branch.

Usage

module "sqs" {
  source = "umotif-public/sqs/aws"
  version = "~> 1.0.0"

  name_prefix = "core-sqs-example-"

  fifo_queue            = true
  fifo_throughput_limit = "perMessageGroupId"

  content_based_deduplication = true
  deduplication_scope         = "messageGroup"

  kms_master_key_id = "alias/aws/sqs"
}

Examples

Authors

Module managed by Marcin Cuber LinkedIn.

Requirements

Name Version
terraform >= 1.0.11
aws >= 3.46.0

Providers

Name Version
aws >= 3.46.0

Modules

No modules.

Resources

Name Type
aws_sqs_queue.main resource

Inputs

Name Description Type Default Required
content_based_deduplication Enables content-based deduplication for FIFO queues bool false no
deduplication_scope Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default). string "queue" no
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 0 no
fifo_queue Boolean designating a FIFO queue bool false no
fifo_throughput_limit pecifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId. string "perQueue" no
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
kms_master_key_id The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK string null no
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
message_retention_seconds The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days) number 345600 no
name This is the human-readable name of the queue. If omitted, Terraform will assign a random name. string null no
name_prefix A unique name beginning with the specified prefix. string null no
policy The JSON policy for the SQS queue string null no
receive_wait_time_seconds The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds) number 0 no
redrive_policy The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5") string null no
tags A mapping of tags to assign to all resources map(string) {} no
visibility_timeout_seconds The visibility timeout for the queue. An integer from 0 to 43200 (12 hours) number 30 no

Outputs

Name Description
sqs_queue_arn The ARN of the SQS queue
sqs_queue_id The URL for the created Amazon SQS queue
sqs_queue_tags_all A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
sqs_queue_url Same as id: The URL for the created Amazon SQS queue.

License

See LICENSE for full details.

Pre-commit hooks

Install dependencies

MacOS

brew install pre-commit terraform-docs tflint

brew tap git-chglog/git-chglog
brew install git-chglog