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

Commit

Permalink
fix(multi-runner): remove renundant default labels (#3715)
Browse files Browse the repository at this point in the history
The multi runner module is adding on two places the default labels like
`self-hosted`, `os` and `arch`. The PR ensures the default labels are
only added in
[`multi-runner/runners.tf`](https://github.com/philips-labs/terraform-aws-github-runner/blob/4f257f9ff643e1f31e597a15dd9a0a65afbdc605/modules/multi-runner/runners.tf#L48)
  • Loading branch information
npalm authored Jan 12, 2024
1 parent 4f257f9 commit 9353734
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/multi-runner/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ locals {
key_base64 = module.ssm.parameters.github_app_key_base64
}

runner_extra_labels = { for k, v in var.multi_runner_config : k => sort(setsubtract(setunion(flatten(v.matcherConfig.labelMatchers), compact(v.runner_config.runner_extra_labels)), ["self-hosted", v.runner_config.runner_os, v.runner_config.runner_architecture])) }
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))) }

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 }, merge(v, { runner_config = merge(v.runner_config, { runner_extra_labels = local.runner_extra_labels[k] }) })) }

Expand Down

0 comments on commit 9353734

Please sign in to comment.