Skip to content

Commit b71fea5

Browse files
committed
add sqs policies to docs
1 parent 74ab7f6 commit b71fea5

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docs/configuration.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,31 @@ resource "aws_sqs_queue" "workflow_job_in_progress" {
358358
name = "workflow_job_in_progress
359359
}
360360
361+
resource "aws_sqs_queue_policy" "workflow_job_in_progress" {
362+
queue_url = aws_sqs_queue.workflow_job_in_progress.id
363+
policy = data.aws_iam_policy_document.sqs_policy.json
364+
}
365+
366+
data "aws_iam_policy_document" "sqs_policy" {
367+
statement {
368+
sid = "AllowFromEventBridge"
369+
actions = ["sqs:SendMessage"]
370+
371+
principals {
372+
type = "Service"
373+
identifiers = ["events.amazonaws.com"]
374+
}
375+
376+
resources = [aws_sqs_queue.workflow_job_in_progress.arn]
377+
378+
condition {
379+
test = "ArnEquals"
380+
variable = "aws:SourceArn"
381+
values = [aws_cloudwatch_event_rule.workflow_job_in_progress.arn]
382+
}
383+
}
384+
}
385+
361386
```
362387

363388

0 commit comments

Comments
 (0)