Skip to content

Commit 7d3617e

Browse files
gravitybacklightnpalm
authored andcommitted
feat: support runner AuthenticationType configuration
* Update main.tf add gitlab_runner_major_version to the config template to support AuthenticationType when version 15 or higher * Update runner-config.tpl add AuthenticationType = "IAM" only if version 15 or higher
1 parent 9bf648b commit 7d3617e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ locals {
131131
bucket_name = local.bucket_name
132132
shared_cache = var.cache_shared
133133
sentry_dsn = var.sentry_dsn
134+
gitlab_runner_major_version = tonumber(split(".", var.gitlab_runner_version)[0])
134135
}
135136
)
136137
}

template/runner-config.tpl

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ log_format = "json"
3737
BucketName = "${bucket_name}"
3838
BucketLocation = "${aws_region}"
3939
Insecure = false
40+
%{ if gitlab_runner_major_version >= 15 } AuthenticationType = "IAM"
41+
%{ endif ~}
4042
[runners.machine]
4143
IdleCount = ${runners_idle_count}
4244
IdleTime = ${runners_idle_time}

0 commit comments

Comments
 (0)