# Template stanza doesn't load env as expected

**URL:** <https://discuss.hashicorp.com/t/template-stanza-doesnt-load-env-as-expected/2455>\
**Category:** Nomad\
**Tags:** consul-template\
**Created:** [August 20, 2019, 4:51am UTC](https://discuss.hashicorp.com/t/template-stanza-doesnt-load-env-as-expected/2455 "2019-08-20T04:51:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tzahimizrahi](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/tzahimizrahi/32/1884_2.png) [@tzahimizrahi](https://discuss.hashicorp.com/u/tzahimizrahi)\
**Post date:** [August 20, 2019, 4:51am UTC](https://discuss.hashicorp.com/t/template-stanza-doesnt-load-env-as-expected/2455/1 "2019-08-20T04:51:31Z")

</div>

Hi guys,  
I’m currently maintain nomad v0.8.6 with no special issues.  
We tried upgrade our test environment with v0.9.3 and v0.9.4 and we experienced an issue that environment variables from template stanza not always being placed.  
Does anyone experienced something similar?

We opened issue on Github but didn’t received feedback yet 🤔  
[https://github.com/hashicorp/nomad/issues/6112](https://github.com/hashicorp/nomad/issues/6112)

---

<div class="post-metadata">

**Author:** ![eveld](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/eveld/32/708_2.png) [@eveld](https://discuss.hashicorp.com/u/eveld)\
**Post date:** [August 20, 2019, 6:27am UTC](https://discuss.hashicorp.com/t/template-stanza-doesnt-load-env-as-expected/2455/2 "2019-08-20T06:27:54Z")

</div>

I have had env vars not being rendered when task names that had a “-” in the names. The environment variables such as NOMAD\_PORT\_task-name\_http would not work because of it.

But dont think this is what you are running in to looking at your github issue.
