diff --git a/products/traefik/inputs.tf b/products/traefik/inputs.tf index bba3ee3..51462bb 100644 --- a/products/traefik/inputs.tf +++ b/products/traefik/inputs.tf @@ -47,23 +47,23 @@ variable "redirect_to_ssl" { description = "Whether to redirect HTTP to HTTPS." } variable "http_port" { - type = number - default = 80 - description = "The port to listen on for HTTP traffic." + type = number + default = 80 + description = "The port to listen on for HTTP traffic." } variable "https_port" { - type = number - default = 443 - description = "The port to listen on for HTTPS traffic." + type = number + default = 443 + description = "The port to listen on for HTTPS traffic." } variable "dashboard_port" { - type = number - default = 8080 - description = "The port to listen on for the dashboard." + type = number + default = 8080 + description = "The port to listen on for the dashboard." } variable "ping_enable" { - type = bool - default = false - description = "Whether to enable the ping endpoint." + type = bool + default = false + description = "Whether to enable the ping endpoint." } \ No newline at end of file diff --git a/products/traefik/traefik.tf b/products/traefik/traefik.tf index 875a401..a4010b3 100644 --- a/products/traefik/traefik.tf +++ b/products/traefik/traefik.tf @@ -20,7 +20,9 @@ module "traefik" { "--log.level=${var.log_level}", "--accesslog=${var.access_log ? "true" : "false"}", (var.ping_enable ? "--ping=true" : null), - (var.ping_enable ? "--ping.entrypoint=traefik,web,websecure" : null), + (var.ping_enable ? "--ping.entrypoint=web" : null), + (var.ping_enable ? "--ping.entrypoint=websecure" : null), + (var.ping_enable ? "--ping.entrypoint=traefik" : null), # Confirm Docker Provider "--providers.docker=true", @@ -39,9 +41,9 @@ module "traefik" { # Configure HTTPS (var.https_port != null && var.ssl_enable ? "--entrypoints.websecure.address=:${var.https_port}" : null), - (var.https_port != null &&var.ssl_enable && var.redirect_to_ssl ? "--entrypoints.web.address=:${var.http_port}" : null), - (var.https_port != null &&var.ssl_enable && var.redirect_to_ssl ? "--entrypoints.web.http.redirections.entrypoint.to=websecure" : null), - (var.https_port != null &&var.ssl_enable && var.redirect_to_ssl ? "--entrypoints.web.http.redirections.entrypoint.scheme=https" : null), + (var.https_port != null && var.ssl_enable && var.redirect_to_ssl ? "--entrypoints.web.address=:${var.http_port}" : null), + (var.https_port != null && var.ssl_enable && var.redirect_to_ssl ? "--entrypoints.web.http.redirections.entrypoint.to=websecure" : null), + (var.https_port != null && var.ssl_enable && var.redirect_to_ssl ? "--entrypoints.web.http.redirections.entrypoint.scheme=https" : null), # Configure the acme provider (var.ssl_enable ? "--certificatesresolvers.default.acme.tlschallenge=true" : null),