Skip to content

Commit

Permalink
Fix null domain error (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-at-luther authored Nov 21, 2024
1 parent 493b35d commit 908c1b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eks-vpc/monitoring.tf
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,12 @@ module "grafana_frontend_url" {

locals {
grafana_endpoint = local.monitoring ? aws_grafana_workspace.grafana[0].endpoint : null
grafana_human_domain = local.monitoring && var.human_domain != "" ? "${module.grafana_frontend_url.prefix}.${var.human_domain}" : null
grafana_human_domain = local.monitoring && var.human_domain != "" ? "${module.grafana_frontend_url.prefix}.${var.human_domain}" : ""
grafana_endpoint_url = local.monitoring ? format("https://%s", local.grafana_endpoint) : ""
}

module "grafana_frontend" {
count = local.grafana_human_domain != null ? 1 : 0
count = local.grafana_human_domain != "" ? 1 : 0

source = "../aws-cf-reverse-proxy"
luther_env = var.luther_env
Expand All @@ -465,7 +465,7 @@ output "grafana_endpoint_url" {
}

output "grafana_human_url" {
value = local.monitoring ? format("https://%s", local.grafana_human_domain) : ""
value = local.monitoring && local.grafana_human_domain != "" ? format("https://%s", local.grafana_human_domain) : ""
}

output "grafana_saml_acs_url" {
Expand Down

0 comments on commit 908c1b4

Please sign in to comment.