Releases: philips-labs/terraform-aws-github-runner
Releases · philips-labs/terraform-aws-github-runner
v5.20.0
5.20.0 (2024-11-19)
Features
- runners: add support to disable default labels (Linux) (#3491) (772e1a5) @jgutierrezglez
- runners: add support to disable default labels (Windows) (#4261) (ad9bcc4) @jgutierrezglez
Bug Fixes
v5.19.0
5.19.0 (2024-11-12)
Features
Bug Fixes
- dispatch only queued events to runners (#4257) (a0a8322)
- lambda: bump @octokit/auth-app from 6.1.2 to 6.1.3 in /lambdas in the octokit group (#4252) (25f3538)
- lambda: bump the aws group in /lambdas with 7 updates (#4251) (6a98712)
Migration notes
This release removes experimental / beta feature enable_workflow_job_events_queue
. When depending on the events on this queue you can migrate to using the EventBridgge.
Enable eventbridge
module "runners" {
...
eventbridge {
enable = true
}
...
Add rule to forward events to a queue
resource "aws_cloudwatch_event_rule" "workflow_job_in_progress" {
name = "workflow-job-in-progress"
event_bus_name = modules.runners.webhook.eventbridge.name # The name of the event bus output by the module
event_pattern = <<EOF
{
"detail-type": ["workflow_job"],
"detail": {
"action": ["in_progress"]
}
}
EOF
}
resource "aws_sqs_queue" "workflow_job_in_progress" {
name = "workflow_job_in_progress
}
resource "aws_sqs_queue_policy" "workflow_job_in_progress" {
queue_url = aws_sqs_queue.workflow_job_in_progress.id
policy = data.aws_iam_policy_document.sqs_policy.json
}
data "aws_iam_policy_document" "sqs_policy" {
statement {
sid = "AllowFromEventBridge"
actions = ["sqs:SendMessage"]
principals {
type = "Service"
identifiers = ["events.amazonaws.com"]
}
resources = [aws_sqs_queue.workflow_job_in_progress.arn]
condition {
test = "ArnEquals"
variable = "aws:SourceArn"
values = [aws_cloudwatch_event_rule.workflow_job_in_progress.arn]
}
}
}
v5.18.4
v5.18.3
v5.18.2
v5.18.1
5.18.1 (2024-10-29)
Bug Fixes
v5.18.0
5.18.0 (2024-10-28)
Features
Migration directions
This release is adding optional the 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.
Examples Terraform `moved` blockes
With module defaults or eventbridge is not eanavbled
# 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
# 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
# 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