Skip to content

Commit 7368f4b

Browse files
committed
feat: Set up per runner type subnet specification
1 parent 726565f commit 7368f4b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/multi-runner/runners.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ module "runners" {
44
aws_region = var.aws_region
55
aws_partition = var.aws_partition
66
vpc_id = var.vpc_id
7-
subnet_ids = var.subnet_ids
87
prefix = "${var.prefix}-${each.key}"
98
tags = merge(local.tags, {
109
"ghr:environment" = "${var.prefix}-${each.key}"
1110
})
1211

1312
s3_runner_binaries = each.value.runner_config.enable_runner_binaries_syncer ? local.runner_binaries_by_os_and_arch_map["${each.value.runner_config.runner_os}_${each.value.runner_config.runner_architecture}"] : null
14-
13+
subnet_ids = length(each.value.runner_config.subnet_ids) > 0 ? each.value.runner_config.subnet_ids : var.subnet_ids
1514
ssm_paths = {
1615
root = "${local.ssm_root_path}/${each.key}"
1716
tokens = "${var.ssm_paths.runners}/tokens"

modules/multi-runner/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ variable "multi_runner_config" {
5555
instance_max_spot_price = optional(string, null)
5656
instance_target_capacity_type = optional(string, "spot")
5757
instance_types = list(string)
58+
subnet_ids = optional(list(string), [])
5859
job_queue_retention_in_seconds = optional(number, 86400)
5960
minimum_running_time_in_minutes = optional(number, null)
6061
pool_runner_owner = optional(string, null)

0 commit comments

Comments
 (0)