philips-labs / terraform-aws-github-runner

Terraform module for scalable GitHub action runners on AWS
https://philips-labs.github.io/terraform-aws-github-runner/
MIT License
2.62k stars 627 forks source link

chore(main): release 5.19.0 #4256

Closed forest-releaser[bot] closed 2 weeks ago

forest-releaser[bot] commented 2 weeks ago

:robot: I have created a release beep boop

5.19.0 (2024-11-12)

Features

Bug Fixes

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]
    }
  }
}

This PR was generated with Release Please. See documentation.

forest-releaser[bot] commented 2 weeks ago

:robot: Release is at https://github.com/philips-labs/terraform-aws-github-runner/releases/tag/v5.19.0 :sunflower: