Skip to content

Commit 362bb1e

Browse files
committed
fix(webhook0: add missing permission to workflow job quque for dispatcher (eventbridge)
1 parent 0c52580 commit 362bb1e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

modules/webhook/eventbridge/dispatcher.tf

+10
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,13 @@ resource "aws_iam_role_policy" "dispatcher_xray" {
143143
policy = data.aws_iam_policy_document.lambda_xray[0].json
144144
role = aws_iam_role.dispatcher_lambda.name
145145
}
146+
147+
resource "aws_iam_role_policy" "webhook_workflow_job_sqs" {
148+
count = var.config.sqs_workflow_job_queue != null ? 1 : 0
149+
name = "publish-workflow-job-sqs-policy"
150+
role = aws_iam_role.webhook_lambda.name
151+
152+
policy = templatefile("${path.module}/../policies/lambda-publish-sqs-policy.json", {
153+
sqs_resource_arns = jsonencode([var.config.sqs_workflow_job_queue.arn])
154+
})
155+
}

0 commit comments

Comments
 (0)