Terraform / OpenTofu
Deploy RunsOn using the official Terraform module
RunsOn provides an official Terraform module for deploying and managing your RunsOn infrastructure as code.
For v3, Terraform / OpenTofu is also the recommended path whenever you need capabilities that are no longer exposed by the built-in CloudFormation template, such as GHES support, reusing an existing VPC, or IAM permission boundaries.
Official Terraform Module
The module is available on both registries:
The recommended v3 approach is to use the explicit Flex submodule:
module "runs_on_flex" {
source = "runs-on/runs-on/aws//flex"
version = "v3.0.0"
github_organization = "my-org"
license_key = "your-license-key"
email = "[email protected]"
app_size = "small"
app_budget_daily_usd = 10
vpc_id = "vpc-xxxxxxxx"
public_subnet_ids = ["subnet-pub1", "subnet-pub2"]
private_subnet_ids = ["subnet-priv1", "subnet-priv2"]
}
output "runs_on_ingress_url" {
description = "RunsOn setup and webhook ingress URL"
value = module.runs_on_flex.ingress.url
}
output "runs_on_getting_started" {
description = "RunsOn post-apply setup instructions"
value = module.runs_on_flex.stack.getting_started
}
For full documentation, available variables, and examples, see the official module on GitHub ↗.
The Terraform module should be used in the following cases:
- Your organization already uses terraform to manage your AWS infrastructure, and you want to use the same tool to manage your RunsOn stack.
- You want full control over how the networking stack is configured, and/or want to re-use an existing VPC.
- You need GHES support or IAM permission boundaries.