Skip to content

Commit 732292e

Browse files
committed
fix: permission dispatcher for workflow job queueu
1 parent bc3818e commit 732292e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

examples/default/main.tf

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ module "runners" {
2626
Project = "ProjectX"
2727
}
2828

29+
eventbridge = {
30+
enable = true
31+
}
32+
enable_workflow_job_events_queue = true
33+
2934
github_app = {
3035
key_base64 = var.github_app.key_base64
3136
id = var.github_app.id

modules/webhook/eventbridge/dispatcher.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ resource "aws_iam_role_policy" "dispatcher_xray" {
144144
role = aws_iam_role.dispatcher_lambda.name
145145
}
146146

147-
resource "aws_iam_role_policy" "webhook_workflow_job_sqs" {
147+
resource "aws_iam_role_policy" "dispatcher_workflow_job_sqs" {
148148
count = var.config.sqs_workflow_job_queue != null ? 1 : 0
149149
name = "publish-workflow-job-sqs-policy"
150-
role = aws_iam_role.webhook_lambda.name
150+
role = aws_iam_role.dispatcher_lambda.name
151151

152152
policy = templatefile("${path.module}/../policies/lambda-publish-sqs-policy.json", {
153153
sqs_resource_arns = jsonencode([var.config.sqs_workflow_job_queue.arn])

0 commit comments

Comments
 (0)