diff --git a/tf-modules/environment_workspace/tfe.tf b/tf-modules/environment_workspace/tfe.tf index 6a34e25..5b2dfd2 100644 --- a/tf-modules/environment_workspace/tfe.tf +++ b/tf-modules/environment_workspace/tfe.tf @@ -69,41 +69,3 @@ resource "tfe_variable" "gcp_project_id" { key = "gcp_project_id" value = google_project.main.project_id } - -// TODO: Remove when https://support.hashicorp.com/hc/en-us/requests/78185 is fixed -resource "tfe_variable" "shared_infra_gcp_project_id" { - workspace_id = tfe_workspace.main.id - - category = "terraform" - key = "shared_infra_gcp_project_id" - value = var.shared_infra_gcp_project_id -} - -// TODO: Remove when https://support.hashicorp.com/hc/en-us/requests/78185 is fixed -resource "tfe_variable" "mongodb_atlas_org_id" { - workspace_id = tfe_workspace.main.id - - category = "terraform" - key = "mongodb_atlas_org_id" - value = var.mongodb_atlas_org_id -} - -// TODO: Remove when https://support.hashicorp.com/hc/en-us/requests/78185 is fixed -resource "tfe_variable" "env_mongodb_atlas_public_key" { - workspace_id = tfe_workspace.main.id - - category = "env" - key = "MONGODB_ATLAS_PUBLIC_KEY" - value = var.env_mongodb_atlas_public_key - sensitive = false -} - -// TODO: Remove when https://support.hashicorp.com/hc/en-us/requests/78185 is fixed -resource "tfe_variable" "env_mongodb_atlas_private_key" { - workspace_id = tfe_workspace.main.id - - category = "env" - key = "MONGODB_ATLAS_PRIVATE_KEY" - value = var.env_mongodb_atlas_private_key - sensitive = true -} diff --git a/tf-modules/environment_workspace/variables.tf b/tf-modules/environment_workspace/variables.tf index 48a8fc1..3fdc3da 100644 --- a/tf-modules/environment_workspace/variables.tf +++ b/tf-modules/environment_workspace/variables.tf @@ -2,9 +2,7 @@ variable "name" { description = "Environment name" } -variable "shared_infra_gcp_project_id" { - default = null // Take from variable set -} +variable "shared_infra_gcp_project_id" {} variable "gcp_parent_folder" {} variable "gcp_billing_account" {} diff --git a/tf-workspace/environments.tf b/tf-workspace/environments.tf index c65c859..a8662e9 100644 --- a/tf-workspace/environments.tf +++ b/tf-workspace/environments.tf @@ -6,6 +6,8 @@ module "env_frankfurt" { gcp_parent_folder = var.gcp_parent_folder gcp_billing_account = var.gcp_billing_account + shared_infra_gcp_project_id = data.google_project.main.project_id + depends_on = [google_project_service.iam] }