-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support AWS EventBridge #4188
Conversation
8f71cbc
to
0c342d6
Compare
Co-authored-by: Marco Pas <[email protected]>
Test Results for 'default' and 'multi-runner' example deployment: I have followed the steps below to verify the functionality of both the 'default' and 'multi-runner' examples.:
Repeated the above steps for the multi-runner configuration. I also verified that the EC2 instances shut down automatically after job completion, in line with the expected behavior for ephemeral (direct) configurations. |
🤖 I have created a release *beep* *boop* --- ## [5.18.0](philips-labs/terraform-aws-github-runner@v5.17.3...v5.18.0) (2024-10-28) ### Features * support AWS EventBridge ([#4188](https://github.com/philips-labs/terraform-aws-github-runner/issues/4188)) ([9607ca6](philips-labs/terraform-aws-github-runner@9607ca6)) ### Migration directions This release is adding optional the [EventBridge](https://philips-labs.github.io/terraform-aws-github-runner/configuration/#eventbridge) as option to the webhook. No matter if the feature is enabled or not resources are moved internally. Which will destroy all webhook related resources update to this verions. To retain data for the Loggroup of the webhook or mmetrics for the webhook the resources not to be moved in the Terraform state. You can add HCL moved blocked to your deployment to instruct Terraform to move the resources instead of re-create. <details> <summary>Examples Terraform `moved` blockes</summary> #### With module defaults or eventbridge is not eanavbled ```hcl # log group moved { from = module.<runner-module-name>.module.webhook.aws_cloudwatch_log_group.webhook to = module.<runner-module-name>.module.webhook.module.direct[0].aws_cloudwatch_log_group.webhook } # lambda moved { from = module.<runner-module-name>.module.webhook.aws_lambda_function.webhook to = module.<runner-module-name>.module.webhook.module.direct[0].aws_lambda_function.webhook } ``` #### With EventBridge enabled ```hcl # log group moved { from = module.<runner-module-name>.module.webhook.aws_cloudwatch_log_group.webhook to = module.<runner-module-name>.module.webhook.module.direct[0].aws_cloudwatch_log_group.webhook } # lambda moved { from = module.<runner-module-name>.module.webhook.aws_lambda_function.webhook to = module.<runner-module-name>.module.webhook.module.direct[0].aws_lambda_function.webhook } ``` #### Ater upgrade swithcing between webhook to EventBridge When enable mode `eventbridge` ```hcl # log group moved { from = module.runners.module.webhook.module.direct[0].aws_cloudwatch_log_group.webhook to = module.runners.module.webhook.module.eventbridge[0].aws_cloudwatch_log_group.webhook } # lambda moved { from = module.runners.module.webhook.module.direct[0].aws_lambda_function.webhook to = module.runners.module.webhook.module.eventbridge[0].aws_lambda_function.webhook } ``` Or vice versa for moving from `eventbride` to `webhook` </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: forest-releaser[bot] <80285352+forest-releaser[bot]@users.noreply.github.com>
Description
This PR introduces the AWS EventBridge. The EventBridge can be enabled with the options
webhook_mode
, which can be set to eitherdirect
oreventbridge
. In the direct mode the olds way of handling is still applied. When setting the mode toeventbridge
events will publshed on the AWS EventBridge, which is not limited only to the eventworkflow_job
with statuesqueued
via a target rule events relevant for scaling a snet to the dispatcher lambda to distrute to a SQS queue for sacling.Todo
MIgration directions
The change is backwards compatible but will recreate resources managed by the internal module webhook. The only resource contianing data is the CloudWatch LogGroup. To retain the log geroup you can run a terraform state move. Or add a
moved
block to your deployemnt.Migrating to this version
With module defaults or eventbridge is not eanavbled
Or with
webhook_mode = eventbridge
When switching between direct and eventbridge
When enable mode
eventbridge
Or vice versa for moving from
eventbride
towebhook