diff --git a/services/service/service_template.nomad b/services/service/service_template.nomad index 2aa3760..e7970d0 100644 --- a/services/service/service_template.nomad +++ b/services/service/service_template.nomad @@ -23,6 +23,7 @@ job "${name}" { %{ for port in ports ~} port "${port.name}" { %{ 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.static != null }static = ${port.static}%{ endif ~} } diff --git a/services/service/vars.tf b/services/service/vars.tf index 568f0e3..291ecc4 100644 --- a/services/service/vars.tf +++ b/services/service/vars.tf @@ -117,6 +117,7 @@ variable "ports" { type = list(object({ name = string host_network = optional(string) + from = optional(number) to = optional(number) static = optional(number) }))