Skip to content

Commit

Permalink
Properly remove TFE variables already defined in variable sets
Browse files Browse the repository at this point in the history
  • Loading branch information
gnarea committed Jan 11, 2024
1 parent 71ffdb2 commit 0913357
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
16 changes: 12 additions & 4 deletions tf-modules/environment_workspace/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@ variable "name" {
description = "Environment name"
}

variable "shared_infra_gcp_project_id" {}
variable "shared_infra_gcp_project_id" {
default = null // Take from variable set
}
variable "gcp_parent_folder" {}
variable "gcp_billing_account" {}

variable "mongodb_atlas_org_id" {}
variable "env_mongodb_atlas_public_key" {}
variable "env_mongodb_atlas_private_key" {}
variable "mongodb_atlas_org_id" {
default = null // Take from variable set
}
variable "env_mongodb_atlas_public_key" {
default = null // Take from variable set
}
variable "env_mongodb_atlas_private_key" {
default = null // Take from variable set
}

variable "tfe_organization" {
default = "Relaycorp"
Expand Down
19 changes: 19 additions & 0 deletions tf-workspace/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions tf-workspace/environments.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ module "env_frankfurt" {
gcp_parent_folder = var.gcp_parent_folder
gcp_billing_account = var.gcp_billing_account

mongodb_atlas_org_id = var.mongodb_atlas_org_id
env_mongodb_atlas_public_key = var.env_mongodb_atlas_public_key
env_mongodb_atlas_private_key = var.env_mongodb_atlas_private_key
shared_infra_gcp_project_id = data.google_project.main.project_id

depends_on = [google_project_service.iam]
}

Expand Down

0 comments on commit 0913357

Please sign in to comment.