File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments