Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit bf73f1c

Browse files
pbarnajcnpalm
andauthored
feat: Add ebs_optimized option (#3492)
Fixes: https://github.com/philips-labs/terraform-aws-github-runner/issues/2988 Adds ebs_optimized parameter for ec2 instances. Currently this defaults to false to keep it in line with the previous behavior. --------- Co-authored-by: Niek Palm <[email protected]>
1 parent 1fad99d commit bf73f1c

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

Diff for: modules/multi-runner/runners.tf

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ module "runners" {
3333

3434
sqs_build_queue = { "arn" : each.value.arn }
3535
github_app_parameters = local.github_app_parameters
36+
ebs_optimized = each.value.runner_config.ebs_optimized
3637
enable_organization_runners = each.value.runner_config.enable_organization_runners
3738
enable_ephemeral_runners = each.value.runner_config.enable_ephemeral_runners
3839
enable_jit_config = each.value.runner_config.enable_jit_config

Diff for: modules/multi-runner/variables.tf

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ variable "multi_runner_config" {
4444
credit_specification = optional(string, null)
4545
delay_webhook_event = optional(number, 30)
4646
disable_runner_autoupdate = optional(bool, false)
47+
ebs_optimized = optional(bool, false)
4748
enable_ephemeral_runners = optional(bool, false)
4849
enable_job_queued_check = optional(bool, null)
4950
enable_organization_runners = optional(bool, false)
@@ -140,6 +141,7 @@ variable "multi_runner_config" {
140141
credit_specification: "(Optional) The credit specification of the runner instance_type. Can be unset, `standard` or `unlimited`.
141142
delay_webhook_event: "The number of seconds the event accepted by the webhook is invisible on the queue before the scale up lambda will receive the event."
142143
disable_runner_autoupdate: "Disable the auto update of the github runner agent. Be aware there is a grace period of 30 days, see also the [GitHub article](https://github.blog/changelog/2022-02-01-github-actions-self-hosted-runners-can-now-disable-automatic-updates/)"
144+
ebs_optimized: "The EC2 EBS optimized configuration."
143145
enable_ephemeral_runners: "Enable ephemeral runners, runners will only be used once."
144146
enable_job_queued_check: "Enables JIT configuration for creating runners instead of registration token based registraton. JIT configuration will only be applied for ephemeral runners. By default JIT confiugration is enabled for ephemeral runners an can be disabled via this override. When running on GHES without support for JIT configuration this variable should be set to true for ephemeral runners."
145147
enable_organization_runners: "Register runners to organization, instead of repo level"

Diff for: modules/runners/main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ resource "aws_launch_template" "runner" {
117117
instance_initiated_shutdown_behavior = "terminate"
118118
image_id = data.aws_ami.runner.id
119119
key_name = var.key_name
120+
ebs_optimized = var.ebs_optimized
120121

121122
vpc_security_group_ids = compact(concat(
122123
var.enable_managed_runner_security_group ? [aws_security_group.runner_sg[0].id] : [],

Diff for: modules/runners/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ variable "block_device_mappings" {
7373
}]
7474
}
7575

76+
variable "ebs_optimized" {
77+
description = "The EC2 EBS optimized configuration."
78+
type = bool
79+
default = false
80+
}
81+
7682
variable "instance_target_capacity_type" {
7783
description = "Default lifecyle used runner instances, can be either `spot` or `on-demand`."
7884
type = string

0 commit comments

Comments
 (0)