From 2b20ef91b2405fd4e90a37425886fe5b3bb71b8c Mon Sep 17 00:00:00 2001 From: Alexios Polyzos <6726377+Dragotic@users.noreply.github.com> Date: Tue, 12 Nov 2024 10:42:18 +0200 Subject: [PATCH] fix: Broken module due to apphub_service_uri output The latest addition to the output, `apphub_service_uri`, breaks the module due to the use of `var.region` which isn't a required variable and defaults to `null`. Getting the region from the `google_redis_instance` resource instead will fix this. --- outputs.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/outputs.tf b/outputs.tf index 8d4f9796..3249b97c 100644 --- a/outputs.tf +++ b/outputs.tf @@ -72,7 +72,7 @@ output "env_vars" { output "apphub_service_uri" { value = { service_uri = "//redis.googleapis.com/${google_redis_instance.default.id}" - service_id = substr("${var.name}-${md5("${var.region}-${var.project_id}")}", 0, 63) + service_id = substr("${var.name}-${md5("${google_redis_instance.default.region}-${var.project_id}")}", 0, 63) } description = "Service URI in CAIS style to be used by Apphub." }