Skip to content

Commit

Permalink
Fix traefik redirects service port
Browse files Browse the repository at this point in the history
  • Loading branch information
trottomv committed Mar 11, 2024
1 parent 4a939af commit ec07e1e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ locals {
tls_enabled = local.manual_certificate_enabled || local.letsencrypt_enabled

tls_secret_name = local.tls_enabled ? "tls-certificate" : ""

redirects_service_port = var.frontend_service_paths != [] ? var.frontend_service_port : var.backend_service_port
}

terraform {
Expand Down Expand Up @@ -372,7 +374,7 @@ resource "kubernetes_manifest" "ingressroute_redirect_to_https" {
services = [
{
name = coalesce(var.frontend_service_slug, var.backend_service_slug)
port = coalesce(var.frontend_service_port, var.backend_service_port)
port = local.redirects_service_port
}
]
}
Expand Down Expand Up @@ -430,7 +432,7 @@ resource "kubernetes_manifest" "ingressroute_secondary_domains_redirect" {
services = [
{
name = coalesce(var.frontend_service_slug, var.backend_service_slug)
port = coalesce(var.frontend_service_port, var.backend_service_port)
port = local.redirects_service_port
}
]
}
Expand Down

0 comments on commit ec07e1e

Please sign in to comment.