From 74ee55599fc2a7710a60d73926410b9b3d8ce70f Mon Sep 17 00:00:00 2001 From: developerdurp Date: Sun, 26 Nov 2023 11:54:04 -0600 Subject: [PATCH] update --- TERRAFORM.GITLAB.PROJECTS/octopus.tf | 9 ++++++--- TERRAFORM.GITLAB.PROJECTS/variables.tf | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/TERRAFORM.GITLAB.PROJECTS/octopus.tf b/TERRAFORM.GITLAB.PROJECTS/octopus.tf index 01f1c67..9b1ea47 100644 --- a/TERRAFORM.GITLAB.PROJECTS/octopus.tf +++ b/TERRAFORM.GITLAB.PROJECTS/octopus.tf @@ -6,9 +6,12 @@ provider "octopusdeploy" { resource "octopusdeploy_tenant" "tenant" { name = var.GITLAB_PROJECT_NAME project_environment { - environments = [ + environments = var.Development ? [ + "Environments-1", + "Environments-2" + ] : [ "Environments-1" - ] + ] project_id = "Projects-1" } tenant_tags = [ @@ -26,7 +29,7 @@ resource "octopusdeploy_tenant_common_variable" "gitlabprojectname" { library_variable_set_id = "LibraryVariableSets-2" template_id = "f14ad0ff-d8cf-44a8-bd8d-ff23b0fdb0f4" tenant_id = octopusdeploy_tenant.tenant.id - value = var.GITLAB_PROJECT_NAME + value = octopusdeploy_tenant.tenant.name } resource "octopusdeploy_tenant_common_variable" "gitlabrunnerid" { diff --git a/TERRAFORM.GITLAB.PROJECTS/variables.tf b/TERRAFORM.GITLAB.PROJECTS/variables.tf index fab12c5..d0cdbde 100644 --- a/TERRAFORM.GITLAB.PROJECTS/variables.tf +++ b/TERRAFORM.GITLAB.PROJECTS/variables.tf @@ -19,3 +19,8 @@ variable "OCTOAPI" { variable "OCTO_TENANT_ID" { type = string } + +variable "Development" { + type = bool + default = false +}