From e43a1785ee346d5dded31654d91b6f262a419c70 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Fri, 17 Feb 2023 10:59:13 +0100 Subject: [PATCH] feat: automatically configure `base` for Homepage and merge with user-defined config --- main.tf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.tf b/main.tf index 9345c60..832bce4 100644 --- a/main.tf +++ b/main.tf @@ -249,9 +249,11 @@ resource "kubernetes_config_map" "homepage_config" { namespace = var.namespace } data = { - "services.yaml" = yamlencode(var.services_config) - "widgets.yaml" = yamlencode(var.widgets_config) - "settings.yaml" = yamlencode(var.settings) + "services.yaml" = yamlencode(var.services_config) + "widgets.yaml" = yamlencode(var.widgets_config) + "settings.yaml" = yamlencode( + merge({ base = "https://${var.host}" }, var.settings) + ) "bookmarks.yaml" = yamlencode(var.bookmarks) "docker.yaml" = yamlencode(var.docker_config) "kubernetes.yaml" = yamlencode(var.kubernetes_config)