Allow specifying port from value for local host binding

This commit is contained in:
IamTheFij 2023-07-24 15:21:41 -07:00
parent b9fb2d4b07
commit c33f877af8
2 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ job "${name}" {
%{ for port in ports ~} %{ for port in ports ~}
port "${port.name}" { port "${port.name}" {
%{ if port.host_network != null }host_network = "${port.host_network}"%{ endif ~} %{ if port.host_network != null }host_network = "${port.host_network}"%{ endif ~}
%{ if port.from != null }to = ${port.from}%{ endif ~}
%{ if port.to != null }to = ${port.to}%{ endif ~} %{ if port.to != null }to = ${port.to}%{ endif ~}
%{ if port.static != null }static = ${port.static}%{ endif ~} %{ if port.static != null }static = ${port.static}%{ endif ~}
} }

View File

@ -117,6 +117,7 @@ variable "ports" {
type = list(object({ type = list(object({
name = string name = string
host_network = optional(string) host_network = optional(string)
from = optional(number)
to = optional(number) to = optional(number)
static = optional(number) static = optional(number)
})) }))