This Terraform module provisions an AWS CodeBuild Runner project with an attached webhook. Currently, AWS does not support creating Runner Projects via API or CLI. This module is a workaround. Terraform creates a default project and, by applying certain webhooks, it converts the project into a Runner project. This module is useful for teams that want to run GitHub Actions on AWS-managed on-demand compute.
- A GitHub App "AWS Connector for GitHub" successfully installed and configured in your AWS account. More info on that
- CodeConnection itself can be provisioned via Terraform but requires manual authorization from AWS. The module will fail if the connection is not authorized.
- 🚀 Provisions a CodeBuild Runner project using GitHub as the source (via CodeConnections)
- 📦 Adds default filter groups to capture key events (indirectly creates a runner project without official support)
- ➕ Supports additional user-supplied filter groups
- 🧠 Automatically configures
scope_configurationwhen applicable (i.e., webhook access at repo level vs org level) - 🔁 Defaults to Lambda compute with 2 GB memory, Linux OS, and Node.js runtime
See the examples dir for examples of usage:
- Access level - Repo | Compute - EC2 | Mode - Container
- Access level - Org | Compute - Lambda (4 GB) | Mode - Container
- Repo-level access with additional webhook filter
This default filter group is the core logic that triggers creation of a runner project. Since AWS does not officially support provisioning CodeBuild runner projects via API, this webhook indirectly transforms a default CodeBuild project into a runner-enabled project.
[ # group 1
{
type = "EVENT"
pattern = "WORKFLOW_JOB_QUEUED"
}
]