Refacto and add modules

This commit is contained in:
2024-02-06 11:03:20 +01:00
parent 140321f714
commit 1e1cedcaeb
47 changed files with 685 additions and 360 deletions

View File

@@ -11,7 +11,7 @@ variable "labels" {
type = map(string)
}
variable "annotations" {
type = map(string)
type = map(string)
default = {}
}
variable "svc_type" {
@@ -22,6 +22,16 @@ variable "svc_type" {
error_message = "Only ClusterIP, ExternalName, NodePort or LoadBalancer is allowed"
}
}
variable "ip_family" {
type = string
default = "PreferDualStack"
validation {
condition = contains(["SingleStack", "PreferDualStack"], var.ip_family)
error_message = "Only SingleStack or PreferDualStack is allowed"
}
}
variable "ports" {
type = list(number)
default = [80]
@@ -51,8 +61,13 @@ variable "node_ports" {
}
}
variable "lb_ports" {
type = list(number)
default = [8080]
type = list(object({
name = string
port = object({
number = number
})
}))
default = []
}
variable "lb_policy" {
type = string