diff --git a/terraform/variables.tf b/terraform/variables.tf index 5158b72..073be02 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -16,7 +16,7 @@ variable "ui_regions" { variable "ui_tag" { type = string description = "Specific tag to deploy" - default = ":main" + default = "" } variable "bot_client_id" { diff --git a/terraform/webapp.tf b/terraform/webapp.tf index 720ac22..5ae7211 100644 --- a/terraform/webapp.tf +++ b/terraform/webapp.tf @@ -1,3 +1,7 @@ +locals { + uiTag = var.ui_tag == "" ? ":${var.environment_tag}" : var.ui_tag +} + resource "google_cloud_run_service" "web" { for_each = toset(var.ui_regions) @@ -7,7 +11,7 @@ resource "google_cloud_run_service" "web" { template { spec { containers { - image = "${local.artifactBaseMap[each.key]}/ui${var.ui_tag}" + image = "${local.artifactBaseMap[each.key]}/ui${local.uiTag}" env { name = "API_PUBLIC_URI"