Skip to content

Commit

Permalink
feat: add new authentication method for GitLab >= 16
Browse files Browse the repository at this point in the history
  • Loading branch information
lmilbaum committed Jun 24, 2024
1 parent c8fc0ef commit 0d05309
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
18 changes: 10 additions & 8 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@ module "runner-instance" {
runner_worker_docker_machine_ami_owners = var.runner_worker_docker_machine_ami_owners

runner_gitlab_registration_config = {
registration_token = var.registration_token_runner
tag_list = "platform-engineering"
description = "Docker Machine"
locked_to_project = "true"
run_untagged = "false"
maximum_timeout = "3600"
type = "group"
group_id = var.gitlab_group_id
tag_list = "platform-engineering"
description = "Docker Machine"
locked_to_project = "true"
run_untagged = "false"
maximum_timeout = "3600"
}

runner_worker_cache = {
Expand Down Expand Up @@ -134,8 +135,9 @@ module "runner-instance" {
}

runner_gitlab = {
url = var.gitlab_url
runner_version = var.runner_version
url = var.gitlab_url
runner_version = var.runner_version
access_token_secure_parameter_store_name = var.access_token_secure_parameter_store_name
}

runner_worker_docker_machine_instance_spot = {
Expand Down
9 changes: 7 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ variable "gitlab_url" {
default = "https://gitlab.com"
}

variable "registration_token_runner" {
description = "Registration token for the runner."
variable "access_token_secure_parameter_store_name" {
description = "Runner Gitlab Access Token SSM Parameter Name"
type = string
sensitive = true
}
Expand Down Expand Up @@ -115,3 +115,8 @@ variable "runner_version" {
type = string
default = "17.0.0" // renovate: packageName=gitlab-org/gitlab-runner
}

variable "gitlab_group_id" {
description = "Gitlab group id"
type = string
}

0 comments on commit 0d05309

Please sign in to comment.