diff --git a/README.md b/README.md index fea963a..3d4457f 100755 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ other optional variables (e.g., `name`, `tags`, etc.) provided by the | `github_organization` | Name of the GitHub organization. | `string` | n/a | yes | | `github_app_webhook_password` | Password for the GitHub app webhook. An empty string implies a randomly generated password. | `string` | `""` | no | | `github_organization_runner_enabled` | Toggle to activate runners for all projects in the organization. | `bool` | `true` | no | +| `key_pair_name` | Name of the key pair to associate with the runner | `string` | n/a | no | | `runner_ephemeral_mode_enabled` | Toggle to activate ephemeral runners. | `bool` | `false` | no | | `runner_version` | Version of the GitHub Action runner. | `string` | n/a | yes | | `runner_os` | Operating system for the GitHub Action runner. | `string` | `"linux"` | no | diff --git a/assets/instance/userdata.sh b/assets/instance/userdata.sh index 47da83a..d6b2777 100644 --- a/assets/instance/userdata.sh +++ b/assets/instance/userdata.sh @@ -60,10 +60,16 @@ export -f provision_instance_stores # --- install: core ----------------------------- + + yum upgrade -y dnf install -y docker +dnf upgrade --refresh rpm glibc +rm /var/lib/rpm/.rpm.lock +dnf -y update + yum install --allowerasing -y \ amazon-cloudwatch-agent \ curl \ diff --git a/main.tf b/main.tf index 87870a2..abfea48 100755 --- a/main.tf +++ b/main.tf @@ -38,7 +38,7 @@ resource "random_string" "github_runner_random_suffix" { module "github_runner" { source = "philips-labs/github-runner/aws" - version = "v3.6.1" + version = "v4.2.3" prefix = module.github_runner_label.id enable_ephemeral_runners = var.runner_ephemeral_mode_enabled @@ -60,6 +60,7 @@ module "github_runner" { instance_target_capacity_type = lower(var.instance_lifecycle_type) instance_types = var.instance_types instance_allocation_strategy = "capacity-optimized" + key_name = var.key_pair_name logging_retention_in_days = var.log_retention subnet_ids = var.vpc_subnet_ids vpc_id = var.vpc_id diff --git a/variables.tf b/variables.tf index f480192..bf95325 100755 --- a/variables.tf +++ b/variables.tf @@ -25,6 +25,12 @@ variable "github_organization_runner_enabled" { default = true } +variable "key_pair_name" { + description = "Name of the key pair to associate with the runner" + type = string + default = null +} + variable "runner_ephemeral_mode_enabled" { type = bool description = "Toggle to activate ephemeral runners."