Skip to content

feat: support centralised webhook proxy in multi-account deployments#5122

Open
Safouak wants to merge 1 commit into
github-aws-runners:mainfrom
Safouak:feat/sqs-extra-policy-and-queue-url-output
Open

feat: support centralised webhook proxy in multi-account deployments#5122
Safouak wants to merge 1 commit into
github-aws-runners:mainfrom
Safouak:feat/sqs-extra-policy-and-queue-url-output

Conversation

@Safouak
Copy link
Copy Markdown

@Safouak Safouak commented May 12, 2026

Description

When deploying runners with a centralised webhook proxy in a separate AWS account (e.g. an account that validates and authorises webhook events before routing them to target accounts), three gaps force consumers to work around the module:

  1. SQS queue policy drift — the module exclusively owns the build queue policy (DenyInsecureTransport only). Adding cross-account sqs:SendMessage requires overriding the whole policy, duplicating DenyInsecureTransport and causing permanent Terraform drift.

  2. Queue URL not exposedaws_sqs_queue_policy requires the queue URL, but the queues output only exposed the ARN, forcing consumers to reconstruct the URL by string-splitting.

  3. Webhook always deployed — the webhook Lambda and API Gateway are always created even when an external proxy handles webhook delivery.

Changes (root module + modules/multi-runner)

  • sqs_build_queue_extra_policy_json (default: null): optional policy JSON merged into the build queue policy via source_policy_documents.
    No-op when unset.
  • build_queue_url added to the root queues output; new queues output added to modules/multi-runner exposing ARN + URL per runner key.
  • create_webhook_module (default: true): set to false to skip the webhook Lambda and API Gateway. The webhook output becomes null when disabled.

@Safouak Safouak requested a review from a team as a code owner May 12, 2026 09:13
When deploying runners with a centralised webhook proxy in a separate AWS
account (e.g. an Ops account that validates and authorises webhook events
before routing them to target accounts), three gaps force consumers to
work around the module:

1. The module exclusively owns the SQS queue policy (DenyInsecureTransport
   only). Adding cross-account sqs:SendMessage requires overriding the whole
   policy, duplicating DenyInsecureTransport and causing permanent Terraform
   drift on every plan.

2. aws_sqs_queue_policy requires the queue URL, not the ARN. The queues
   output only exposed the ARN, forcing consumers to reconstruct the URL
   by string-splitting.

3. The webhook Lambda and API Gateway are always deployed even when the
   module's built-in webhook is not used (the external proxy receives GitHub
   events directly and publishes to SQS, bypassing the module's endpoint).

Changes (root module + modules/multi-runner):

- sqs_build_queue_extra_policy_json (default: null): optional policy JSON
  merged into the build queue policy via source_policy_documents. No-op
  when unset — no behaviour change for existing deployments.

- build_queue_url added to the queues output (root); queues output added
  to modules/multi-runner exposing ARN + URL per runner key.

- create_webhook_module (default: true): set to false to skip the webhook
  Lambda and API Gateway. The webhook output becomes null when disabled.
@Safouak Safouak force-pushed the feat/sqs-extra-policy-and-queue-url-output branch from 34717f5 to 315b095 Compare May 12, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant