Skip to content

Commit

Permalink
fix: don't apply extra labels unless defined (philips-labs#2181)
Browse files Browse the repository at this point in the history
Co-authored-by: Jono Hill <jono.hill@tether.co.nz>
Co-authored-by: Niek Palm <npalm@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 23, 2022
1 parent 9b9da03 commit c0b11bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ locals {
id = module.ssm.parameters.github_app_id
key_base64 = module.ssm.parameters.github_app_key_base64
}

default_runner_labels = "self-hosted,${var.runner_os},${var.runner_architecture}"
}

resource "random_string" "random" {
Expand Down Expand Up @@ -112,7 +114,7 @@ module "webhook" {
# labels
enable_workflow_job_labels_check = var.runner_enable_workflow_job_labels_check
workflow_job_labels_check_all = var.runner_enable_workflow_job_labels_check_all
runner_labels = "self-hosted,${var.runner_os},${var.runner_architecture},${var.runner_extra_labels}"
runner_labels = var.runner_extra_labels != "" ? "${local.default_runner_labels},${var.runner_extra_labels}" : local.default_runner_labels

role_path = var.role_path
role_permissions_boundary = var.role_permissions_boundary
Expand Down

0 comments on commit c0b11bb

Please sign in to comment.