mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-03-13 01:00:50 -04:00
1.0 KiB
1.0 KiB
layout, page_title, sidebar_current, description
| layout | page_title | sidebar_current | description |
|---|---|---|---|
| aws | AWS: aws_sqs_queue_policy | docs-aws-resource-sqs-queue-policy | Provides a SQS Queue Policy resource. |
aws_sqs_queue_policy
Allows you to set a policy of an SQS Queue while referencing ARN of the queue within the policy.
Example Usage
resource "aws_sqs_queue" "q" {
name = "examplequeue"
}
resource "aws_sqs_queue_policy" "test" {
queue_url = "${aws_sqs_queue.q.id}"
policy = <<POLICY
{
"Version": "2012-10-17",
"Id": "sqspolicy",
"Statement": [
{
"Sid": "First",
"Effect": "Allow",
"Principal": "*",
"Action": "sqs:SendMessage",
"Resource": "${aws_sqs_queue.q.arn}",
"Condition": {
"ArnEquals": {
"aws:SourceArn": "${aws_sqs_queue.q.arn}"
}
}
}
]
}
POLICY
}
Argument Reference
The following arguments are supported:
queue_url- (Required) The URL of the SQS Queue to which to attach the policypolicy- (Required) The JSON policy for the SQS queue