Refacto and add modules

This commit is contained in:
2024-02-06 11:03:20 +01:00
parent 159b576b24
commit bcdf666cc0
47 changed files with 661 additions and 338 deletions

View File

@@ -24,35 +24,37 @@ variable "middlewares" {
type = list(string)
default = []
}
variable "services" {
type = list(any)
variable "services_mapping" {
type = list(object({
path = optional(string)
service = object({
name= string
port = object({
number = number
})
})
}))
}
variable "create_redirect" {
type = bool
default = true
}
variable "create_cert" {
type = bool
default = true
}
variable "enforce_tls" {
type = bool
default = true
}
variable "sub_paths" {
type = list(string)
default = [""]
}
variable "cert_name" {
type = string
default = ""
}
variable "entrypoint" {
type = string
default = ""
type = string
default = ""
description = "Define ingres support, if empty or define to websecure, tls will be activate"
validation {
condition = contains(["", "web", "websecure"], var.entrypoint)
error_message = "Only empty \"\", web or websecure is allowed"
}
}
variable "cert_name" {
type = string
default = ""
description = "Give a secret name for tls, if empty and entrypointis websecure or empty, one will be created"
}
variable "create_redirect" {
type = bool
default = true
description = "Enfore https redirection"
}