Skip to content

Commit 5081205

Browse files
committed
fix: error for multi-runner setup when using extra_labels
1 parent a1348bc commit 5081205

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

modules/multi-runner/main.tf

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,23 @@ locals {
1111

1212
runner_extra_labels = { for k, v in var.multi_runner_config : k => sort(setunion(flatten(v.matcherConfig.labelMatchers), compact(v.runner_config.runner_extra_labels))) }
1313

14-
runner_config = { for k, v in var.multi_runner_config : k => merge({ id = aws_sqs_queue.queued_builds[k].id, arn = aws_sqs_queue.queued_builds[k].arn, url = aws_sqs_queue.queued_builds[k].url }, merge(v, { runner_config = merge(v.runner_config, { runner_extra_labels = local.runner_extra_labels[k] }) })) }
14+
runner_config = { for k, v in var.multi_runner_config : k => merge(
15+
{
16+
id = aws_sqs_queue.queued_builds[k].id,
17+
arn = aws_sqs_queue.queued_builds[k].arn,
18+
url = aws_sqs_queue.queued_builds[k].url
19+
},
20+
merge(v, {
21+
runner_config = merge(
22+
v.runner_config,
23+
{ runner_extra_labels = local.runner_extra_labels[k]
24+
}),
25+
matcherConfig = merge(
26+
v.matcherConfig,
27+
{ labelMatchers = [local.runner_extra_labels[k]] }
28+
)
29+
})
30+
) }
1531

1632
tmp_distinct_list_unique_os_and_arch = distinct([for i, config in local.runner_config : { "os_type" : config.runner_config.runner_os, "architecture" : config.runner_config.runner_architecture } if config.runner_config.enable_runner_binaries_syncer])
1733
unique_os_and_arch = { for i, v in local.tmp_distinct_list_unique_os_and_arch : "${v.os_type}_${v.architecture}" => v }

0 commit comments

Comments
 (0)