Skip to content

Commit

Permalink
add sqs policies to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
npalm committed Nov 11, 2024
1 parent 74ab7f6 commit b71fea5
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,31 @@ resource "aws_sqs_queue" "workflow_job_in_progress" {
name = "workflow_job_in_progress
}
resource "aws_sqs_queue_policy" "workflow_job_in_progress" {
queue_url = aws_sqs_queue.workflow_job_in_progress.id
policy = data.aws_iam_policy_document.sqs_policy.json
}
data "aws_iam_policy_document" "sqs_policy" {
statement {
sid = "AllowFromEventBridge"
actions = ["sqs:SendMessage"]
principals {
type = "Service"
identifiers = ["events.amazonaws.com"]
}
resources = [aws_sqs_queue.workflow_job_in_progress.arn]
condition {
test = "ArnEquals"
variable = "aws:SourceArn"
values = [aws_cloudwatch_event_rule.workflow_job_in_progress.arn]
}
}
}
```


Expand Down

0 comments on commit b71fea5

Please sign in to comment.