Skip to content

Commit 9e95022

Browse files
committed
fix(runners): fix type mismatch in pool role conditional
The conditional for the runner role in pool.tf returned inconsistent types: the true branch produced an object with a single 'arn' attribute while the false branch returned the full aws_iam_role resource (16 attributes). Terraform requires both branches to have consistent types. Move the conditional inside the object so both branches produce a string for the 'arn' key. Fixes type error introduced in github-aws-runners#4875. Upstream-PR: github-aws-runners#5156
1 parent 038a756 commit 9e95022

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/runners/pool.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ module "pool" {
5151
group_name = var.runner_group_name
5252
name_prefix = var.runner_name_prefix
5353
pool_owner = var.pool_runner_owner
54-
role = var.iam_overrides["override_runner_role"] ? { arn = var.iam_overrides["runner_role_arn"] } : aws_iam_role.runner[0]
54+
role = { arn = var.iam_overrides["override_runner_role"] ? var.iam_overrides["runner_role_arn"] : aws_iam_role.runner[0].arn }
5555
use_dedicated_host = var.use_dedicated_host
5656
}
5757
subnet_ids = var.subnet_ids

0 commit comments

Comments
 (0)