Add example of env vars in templates

This commit is contained in:
Michael Schurter
2017-01-23 15:50:38 -08:00
parent af66ea3551
commit 9fdc2691ac

View File

@@ -97,7 +97,8 @@ It is also possible to use heredocs for multi-line templates, like:
template {
data = <<EOH
---
key: {{ key "service/my-key" }}
id: {{ env "NOMAD_ALLOC_ID" }}-{{ env "NOMAD_ALLOC_INDEX" }}
service_key: {{ key "service/my-key" }}
EOH
destination = "local/file.yml"