github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/r/sqs_queue.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_sqs_queue"
     4  sidebar_current: "docs-aws-resource-sqs-queue"
     5  description: |-
     6    Provides a SQS resource.
     7  ---
     8  
     9  # aws\_sqs\_queue
    10  
    11  ## Example Usage
    12  
    13  ```hcl
    14  resource "aws_sqs_queue" "terraform_queue" {
    15    name                      = "terraform-example-queue"
    16    delay_seconds             = 90
    17    max_message_size          = 2048
    18    message_retention_seconds = 86400
    19    receive_wait_time_seconds = 10
    20    redrive_policy            = "{\"deadLetterTargetArn\":\"${aws_sqs_queue.terraform_queue_deadletter.arn}\",\"maxReceiveCount\":4}"
    21  }
    22  ```
    23  
    24  ## FIFO queue
    25  
    26  ```hcl
    27  resource "aws_sqs_queue" "terraform_queue" {
    28    name                        = "terraform-example-queue.fifo"
    29    fifo_queue                  = true
    30    content_based_deduplication = true
    31  }
    32  ```
    33  
    34  ## Argument Reference
    35  
    36  The following arguments are supported:
    37  
    38  * `name` - (Required) This is the human-readable name of the queue
    39  * `visibility_timeout_seconds` - (Optional) The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default for this attribute is 30. For more information about visibility timeout, see [AWS docs](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AboutVT.html).
    40  * `message_retention_seconds` - (Optional) The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days). The default for this attribute is 345600 (4 days).
    41  * `max_message_size` - (Optional) 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). The default for this attribute is 262144 (256 KiB).
    42  * `delay_seconds` - (Optional) The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes). The default for this attribute is 0 seconds.
    43  * `receive_wait_time_seconds` - (Optional) 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). The default for this attribute is 0, meaning that the call will return immediately.
    44  * `policy` - (Optional) The JSON policy for the SQS queue
    45  * `redrive_policy` - (Optional) The JSON policy to set up the Dead Letter Queue, see [AWS docs](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSDeadLetterQueue.html). **Note:** when specifying `maxReceiveCount`, you must specify it as an integer (`5`), and not a string (`"5"`).
    46  * `fifo_queue` - (Optional) Boolean designating a FIFO queue. If not set, it defaults to `false` making it standard.
    47  * `content_based_deduplication` - (Optional) Enables content-based deduplication for FIFO queues. For more information, see the [related documentation](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing)
    48  
    49  ## Attributes Reference
    50  
    51  The following attributes are exported:
    52  
    53  * `id` - The URL for the created Amazon SQS queue.
    54  * `arn` - The ARN of the SQS queue
    55  
    56  ## Import
    57  
    58  SQS Queues can be imported using the `queue url`, e.g.
    59  
    60  ```
    61  $ terraform import aws_sqs_queue.public_queue https://queue.amazonaws.com/80398EXAMPLE/MyQueue
    62  ```