ports declarations should support publish_mode

This commit is contained in:
Greyscale 2025-03-03 15:50:11 +01:00
parent 4a1078d55d
commit 545244341c
6 changed files with 25 additions and 19 deletions
products
http2https
iperf
memcached
mysql
openhaystack
postgres

View file

@ -27,9 +27,10 @@ variable "networks" {
} }
variable "ports" { variable "ports" {
type = list(object({ type = list(object({
host = optional(number) host = optional(number, null)
container = number container = number
protocol = optional(string, "tcp") protocol = optional(string, "tcp")
publish_mode = optional(string, "ingress")
})) }))
default = [] default = []
description = "A map of port mappings to expose on the host. The key is the host port, and the value is the container port." description = "A map of port mappings to expose on the host. The key is the host port, and the value is the container port."

View file

@ -27,9 +27,10 @@ variable "networks" {
} }
variable "ports" { variable "ports" {
type = list(object({ type = list(object({
host = optional(number) host = optional(number, null)
container = number container = number
protocol = optional(string, "tcp") protocol = optional(string, "tcp")
publish_mode = optional(string, "ingress")
})) }))
default = [] default = []
description = "A map of port mappings to expose on the host. The key is the host port, and the value is the container port." description = "A map of port mappings to expose on the host. The key is the host port, and the value is the container port."

View file

@ -42,9 +42,10 @@ variable "networks" {
} }
variable "ports" { variable "ports" {
type = list(object({ type = list(object({
host = optional(number) host = optional(number, null)
container = number container = number
protocol = optional(string, "tcp") protocol = optional(string, "tcp")
publish_mode = optional(string, "ingress")
})) }))
default = [] default = []
description = "A map of port mappings to expose on the host. The key is the host port, and the value is the container port." description = "A map of port mappings to expose on the host. The key is the host port, and the value is the container port."

View file

@ -52,9 +52,10 @@ variable "networks" {
} }
variable "ports" { variable "ports" {
type = list(object({ type = list(object({
host = optional(number) host = optional(number, null)
container = number container = number
protocol = optional(string, "tcp") protocol = optional(string, "tcp")
publish_mode = optional(string, "ingress")
})) }))
default = [] default = []
description = "A map of port mappings to expose on the host. The key is the host port, and the value is the container port." description = "A map of port mappings to expose on the host. The key is the host port, and the value is the container port."

View file

@ -16,10 +16,11 @@ variable "networks" {
description = "A list of network names to attach the service to." description = "A list of network names to attach the service to."
} /* } /*
variable "ports" { variable "ports" {
type = list(object({ type = list(object({
host = optional(number) host = optional(number, null)
container = number container = number
protocol = optional(string, "tcp") protocol = optional(string, "tcp")
publish_mode = optional(string, "ingress")
})) }))
default = [] default = []
description = "A map of port mappings to expose on the host. The key is the host port, and the value is the container port." description = "A map of port mappings to expose on the host. The key is the host port, and the value is the container port."

View file

@ -47,9 +47,10 @@ variable "networks" {
} }
variable "ports" { variable "ports" {
type = list(object({ type = list(object({
host = optional(number) host = optional(number, null)
container = number container = number
protocol = optional(string, "tcp") protocol = optional(string, "tcp")
publish_mode = optional(string, "ingress")
})) }))
default = [] default = []
description = "A map of port mappings to expose on the host. The key is the host port, and the value is the container port." description = "A map of port mappings to expose on the host. The key is the host port, and the value is the container port."