From d7527a11e49f1fc5239d417bdaf42dda9ee2eac2 Mon Sep 17 00:00:00 2001
From: Matthew Baggett <matthew@baggett.me>
Date: Thu, 16 Jan 2025 19:39:53 +0100
Subject: [PATCH] var.treafik copy-paste...

---
 products/dex/inputs.tf             | 17 ++++++++---------
 products/forgejo/forgejo/inputs.tf | 17 ++++++++---------
 products/homeassistant/inputs.tf   | 17 ++++++++---------
 products/minio/inputs.tf           | 17 ++++++++---------
 products/pgbackweb/inputs.tf       | 17 ++++++++---------
 products/portainer/ui/inputs.tf    | 17 ++++++++---------
 products/postgres/inputs.tf        |  4 ++--
 products/yarr/inputs.tf            | 17 ++++++++---------
 8 files changed, 58 insertions(+), 65 deletions(-)

diff --git a/products/dex/inputs.tf b/products/dex/inputs.tf
index c97f973..c704293 100644
--- a/products/dex/inputs.tf
+++ b/products/dex/inputs.tf
@@ -18,15 +18,14 @@ variable "placement_constraints" {
 variable "traefik" {
   default = null
   type = object({
-    domain  = string
-    port    = optional(number)
-    non-ssl = optional(bool, true)
-    ssl     = optional(bool, false)
-    rule    = optional(string)
-    network = optional(object({
-      name = string
-      id   = string
-    }))
+    domain           = string
+    port             = optional(number)
+    non-ssl          = optional(bool, true)
+    ssl              = optional(bool, false)
+    rule             = optional(string)
+    middlewares      = optional(list(string))
+    network          = optional(object({ name = string, id = string }))
+    basic-auth-users = optional(list(string))
   })
   description = "Whether to enable traefik for the service."
 }
diff --git a/products/forgejo/forgejo/inputs.tf b/products/forgejo/forgejo/inputs.tf
index 84d4fbf..c094290 100644
--- a/products/forgejo/forgejo/inputs.tf
+++ b/products/forgejo/forgejo/inputs.tf
@@ -64,15 +64,14 @@ variable "database_storage_path" {
 variable "traefik" {
   default = null
   type = object({
-    domain  = string
-    port    = optional(number)
-    non-ssl = optional(bool, true)
-    ssl     = optional(bool, false)
-    rule    = optional(string)
-    network = optional(object({
-      name = string
-      id   = string
-    }))
+    domain           = string
+    port             = optional(number)
+    non-ssl          = optional(bool, true)
+    ssl              = optional(bool, false)
+    rule             = optional(string)
+    middlewares      = optional(list(string))
+    network          = optional(object({ name = string, id = string }))
+    basic-auth-users = optional(list(string))
   })
   description = "Whether to enable traefik for the service."
 }
\ No newline at end of file
diff --git a/products/homeassistant/inputs.tf b/products/homeassistant/inputs.tf
index dfaa373..a0fb32a 100644
--- a/products/homeassistant/inputs.tf
+++ b/products/homeassistant/inputs.tf
@@ -36,15 +36,14 @@ variable "placement_constraints" {
 variable "traefik" {
   default = null
   type = object({
-    domain  = string
-    port    = optional(number)
-    non-ssl = optional(bool, true)
-    ssl     = optional(bool, false)
-    rule    = optional(string)
-    network = optional(object({
-      name = string
-      id   = string
-    }))
+    domain           = string
+    port             = optional(number)
+    non-ssl          = optional(bool, true)
+    ssl              = optional(bool, false)
+    rule             = optional(string)
+    middlewares      = optional(list(string))
+    network          = optional(object({ name = string, id = string }))
+    basic-auth-users = optional(list(string))
   })
   description = "Whether to enable traefik for the service."
 }
\ No newline at end of file
diff --git a/products/minio/inputs.tf b/products/minio/inputs.tf
index cf7c66f..6e46aed 100644
--- a/products/minio/inputs.tf
+++ b/products/minio/inputs.tf
@@ -15,15 +15,14 @@ variable "networks" {
 variable "traefik" {
   default = null
   type = object({
-    domain  = string
-    port    = optional(number)
-    non-ssl = optional(bool, true)
-    ssl     = optional(bool, false)
-    rule    = optional(string)
-    network = optional(object({
-      name = string
-      id   = string
-    }))
+    domain           = string
+    port             = optional(number)
+    non-ssl          = optional(bool, true)
+    ssl              = optional(bool, false)
+    rule             = optional(string)
+    middlewares      = optional(list(string))
+    network          = optional(object({ name = string, id = string }))
+    basic-auth-users = optional(list(string))
   })
   description = "Whether to enable traefik for the service."
 }
diff --git a/products/pgbackweb/inputs.tf b/products/pgbackweb/inputs.tf
index eccf9eb..c2af6f5 100644
--- a/products/pgbackweb/inputs.tf
+++ b/products/pgbackweb/inputs.tf
@@ -35,15 +35,14 @@ variable "networks" {
 variable "traefik" {
   default = null
   type = object({
-    domain  = string
-    port    = optional(number)
-    non-ssl = optional(bool, true)
-    ssl     = optional(bool, false)
-    rule    = optional(string)
-    network = optional(object({
-      name = string
-      id   = string
-    }))
+    domain           = string
+    port             = optional(number)
+    non-ssl          = optional(bool, true)
+    ssl              = optional(bool, false)
+    rule             = optional(string)
+    middlewares      = optional(list(string))
+    network          = optional(object({ name = string, id = string }))
+    basic-auth-users = optional(list(string))
   })
   description = "Whether to enable traefik for the service."
 }
\ No newline at end of file
diff --git a/products/portainer/ui/inputs.tf b/products/portainer/ui/inputs.tf
index 91debca..73a705d 100644
--- a/products/portainer/ui/inputs.tf
+++ b/products/portainer/ui/inputs.tf
@@ -14,15 +14,14 @@ variable "networks" {
 variable "traefik" {
   default = null
   type = object({
-    domain  = string
-    port    = optional(number)
-    non-ssl = optional(bool, true)
-    ssl     = optional(bool, false)
-    rule    = optional(string)
-    network = optional(object({
-      name = string
-      id   = string
-    }))
+    domain           = string
+    port             = optional(number)
+    non-ssl          = optional(bool, true)
+    ssl              = optional(bool, false)
+    rule             = optional(string)
+    middlewares      = optional(list(string))
+    network          = optional(object({ name = string, id = string }))
+    basic-auth-users = optional(list(string))
   })
   description = "Whether to enable traefik for the service."
 }
diff --git a/products/postgres/inputs.tf b/products/postgres/inputs.tf
index e36ad77..2dd6ee2 100644
--- a/products/postgres/inputs.tf
+++ b/products/postgres/inputs.tf
@@ -4,7 +4,7 @@ variable "postgres_image" {
   description = "The docker image to use for the postgres service."
 }
 variable "postgres_version" {
-  default     = "latest"
+  default     = "17"
   type        = string
   description = "The version of the docker image to use for the postgres service."
 }
@@ -53,7 +53,7 @@ variable "ports" {
     condition     = alltrue([for port in var.ports : port.container >= 1 && port.container <= 65535])
   }
   validation {
-    error_message = "protocol must be either 'tcp' or 'udp'."
+    error_message = "Protocol must be either 'tcp' or 'udp'."
     condition     = alltrue([for port in var.ports : port.protocol == "tcp" || port.protocol == "udp"])
   }
 }
diff --git a/products/yarr/inputs.tf b/products/yarr/inputs.tf
index eb437a4..eeb1cb7 100644
--- a/products/yarr/inputs.tf
+++ b/products/yarr/inputs.tf
@@ -18,15 +18,14 @@ variable "placement_constraints" {
 variable "traefik" {
   default = null
   type = object({
-    domain  = string
-    port    = optional(number)
-    non-ssl = optional(bool, true)
-    ssl     = optional(bool, false)
-    rule    = optional(string)
-    network = optional(object({
-      name = string
-      id   = string
-    }))
+    domain           = string
+    port             = optional(number)
+    non-ssl          = optional(bool, true)
+    ssl              = optional(bool, false)
+    rule             = optional(string)
+    middlewares      = optional(list(string))
+    network          = optional(object({ name = string, id = string }))
+    basic-auth-users = optional(list(string))
   })
   description = "Whether to enable traefik for the service."
 }
\ No newline at end of file