diff --git a/nomad/service.nomad b/nomad/service.nomad index 5d1018f..c589eba 100644 --- a/nomad/service.nomad +++ b/nomad/service.nomad @@ -17,6 +17,7 @@ # healthcheck = "/" # mysql = bool # redis = bool +# vault = bool job "[[.name]]" { region = "global" datacenters = ["dc1"] @@ -121,6 +122,15 @@ job "[[.name]]" { [[ end ]] } + [[ if default false .vault -]] + vault { + policies = [ + "access-tables", + "nomad-task", + ] + } + [[ end -]] + [[ with .env -]] env = { [[- range $k, $v := . ]]