This commit is contained in:
2023-12-19 08:14:10 -06:00
parent 9c52840bc5
commit b3f21b6113
3 changed files with 16 additions and 9 deletions

View File

@@ -35,11 +35,12 @@ resource "gitlab_project_runner_enablement" "k3s" {
runner_id = octopusdeploy_tenant_common_variable.gitlabrunnerid.value
}
#resource "gitlab_project_variable" "OCTOAPI" {
# count = var.OCTOAPI != "" ? 1 : 0
# project = gitlab_project.project.id
# key = "OCTOAPI"
# value = var.OCTOAPI
# protected = false
# masked = true
#}
resource "gitlab_project_variable" "OCTOAPI" {
count = var.Enable_OCTOAPI ? 1 : 0
project = gitlab_project.project.id
key = "OCTOAPI"
value = var.OCTOAPI
protected = false
masked = true
}

View File

@@ -11,6 +11,11 @@ variable "GITLAB_SHARED_RUNNER_ID" {
default = 0
}
variable "Enable_OCTOAPI" {
type = bool
default = false
}
variable "OCTOAPI" {
type = string
default = ""

View File

@@ -2,5 +2,6 @@ GITLAB_TOKEN="#{GITLAB_TOKEN}"
GITLAB_PROJECT_NAME="#{GITLAB_PROJECT_NAME}"
GITLAB_SHARED_RUNNER_ID="#{GITLAB_SHARED_RUNNER_ID}"
OCTOAPI="#{OCTOAPI}"
Enable_OCTOAPI="#{Enable_OCTOAPI}"
OCTO_TENANT_ID="#{OCTO_TENANT_ID}"
Development="#{Development}"
Development="#{Development}"