From 9244636fd4e85fbdef89b2902514436a8cb18c23 Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Tue, 28 May 2024 19:39:02 -0400 Subject: [PATCH] fixes --- main.tf | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/main.tf b/main.tf index 565f14fd..d26147a9 100644 --- a/main.tf +++ b/main.tf @@ -21,12 +21,11 @@ module "project_factory_project_services" { } locals { - fqdn = var.subdomain == null ? var.domain_name : "${var.subdomain}.${var.domain_name}" - url_prefix = var.ssl ? "https" : "http" - url = "${local.url_prefix}://${local.fqdn}" - internal_app_port = 32543 - create_bucket = var.bucket_name == "" - create_network = var.network == null + fqdn = var.subdomain == null ? var.domain_name : "${var.subdomain}.${var.domain_name}" + url_prefix = var.ssl ? "https" : "http" + url = "${local.url_prefix}://${local.fqdn}" + create_bucket = var.bucket_name == "" + create_network = var.network == null } module "service_accounts" { @@ -45,7 +44,7 @@ module "kms" { } locals { - crypto_key = var.use_internal_queue ? null : module.kms.0.crypto_key + crypto_key = var.use_internal_queue ? null : module.kms[0].crypto_key } module "storage" { @@ -72,9 +71,9 @@ module "networking" { } locals { - network_connection = try(module.networking.0.connection, { network = var.network }) - network = try(module.networking.0.network, { self_link = var.network }) - subnetwork = try(module.networking.0.subnetwork, { self_link = var.subnetwork }) + network_connection = try(module.networking[0].connection, { network = var.network }) + network = try(module.networking[0].network, { self_link = var.network }) + subnetwork = try(module.networking[0].subnetwork, { self_link = var.subnetwork }) } module "app_gke" { @@ -128,10 +127,10 @@ module "redis" { } locals { - redis_certificate = var.create_redis ? module.redis.0.ca_cert : null - redis_connection_string = var.create_redis ? "redis://:${module.redis.0.auth_string}@${module.redis.0.connection_string}?tls=true&ttlInSeconds=604800&caCertPath=/etc/ssl/certs/server_ca.pem" : null - bucket = local.create_bucket ? module.storage.0.bucket_name : var.bucket_name - bucket_queue = var.use_internal_queue ? "internal://" : "pubsub:/${module.storage.0.bucket_queue_name}" + redis_certificate = var.create_redis ? module.redis[0].ca_cert : null + redis_connection_string = var.create_redis ? "redis://:${module.redis[0].auth_string}@${module.redis[0].connection_string}?tls=true&ttlInSeconds=604800&caCertPath=/etc/ssl/certs/server_ca.pem" : null + bucket = local.create_bucket ? module.storage[0].bucket_name : var.bucket_name + bucket_queue = var.use_internal_queue ? "internal://" : "pubsub:/${module.storage[0].bucket_queue_name}" project_id = module.project_factory_project_services.project_id secret_store_source = "gcp-secretmanager://${local.project_id}?namespace=${var.namespace}" } @@ -218,10 +217,10 @@ module "wandb" { } redis = var.create_redis ? { - password = module.redis.0.auth_string - host = module.redis.0.host - port = module.redis.0.port - caCert = module.redis.0.ca_cert + password = module.redis[0].auth_string + host = module.redis[0].host + port = module.redis[0].port + caCert = module.redis[0].ca_cert params = { tls = true ttlInSeconds = 604800