1
0
Fork 0
mirror of https://github.com/imjasonh/terraform-playground synced 2026-07-06 23:12:22 +00:00

container-vm: expose ports

Signed-off-by: Jason Hall <jason@chainguard.dev>
This commit is contained in:
Jason Hall 2025-11-30 14:13:47 -05:00
parent 4810e4ce21
commit 4232d5780e
2 changed files with 4 additions and 0 deletions

View file

@ -48,6 +48,9 @@ write_files:
--log-opt labels=container_name \
--label container_name=${name} \
%{ endif ~}
%{ for port in container.ports ~}
-p ${port} \
%{ endfor ~}
%{ for e in container.env ~}
-e ${e.name}="${e.value}" \
%{ endfor ~}

View file

@ -24,6 +24,7 @@ variable "containers" {
name = string
value = string
})), [])
ports = optional(list(string), [])
restart_policy = optional(string, "always")
}))