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

Commit c0b11bb

Browse files
jonohillJono Hillnpalm
authored
fix: don't apply extra labels unless defined (#2181)
Co-authored-by: Jono Hill <[email protected]> Co-authored-by: Niek Palm <[email protected]>
1 parent 9b9da03 commit c0b11bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: main.tf

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ locals {
88
id = module.ssm.parameters.github_app_id
99
key_base64 = module.ssm.parameters.github_app_key_base64
1010
}
11+
12+
default_runner_labels = "self-hosted,${var.runner_os},${var.runner_architecture}"
1113
}
1214

1315
resource "random_string" "random" {
@@ -112,7 +114,7 @@ module "webhook" {
112114
# labels
113115
enable_workflow_job_labels_check = var.runner_enable_workflow_job_labels_check
114116
workflow_job_labels_check_all = var.runner_enable_workflow_job_labels_check_all
115-
runner_labels = "self-hosted,${var.runner_os},${var.runner_architecture},${var.runner_extra_labels}"
117+
runner_labels = var.runner_extra_labels != "" ? "${local.default_runner_labels},${var.runner_extra_labels}" : local.default_runner_labels
116118

117119
role_path = var.role_path
118120
role_permissions_boundary = var.role_permissions_boundary

0 commit comments

Comments
 (0)