# Compose.yml.tpl for volume names

**URL:** <https://forums.suse.com/t/compose-yml-tpl-for-volume-names/8505>\
**Category:** Rancher 1.x\
**Created:** [February 2, 2018, 9:44am UTC](https://forums.suse.com/t/compose-yml-tpl-for-volume-names/8505 "2018-02-02T09:44:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stefano\_C](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/stefano_c/32/3306_2.png) [@Stefano\_C](https://forums.suse.com/u/Stefano_C)\
**Post date:** [February 2, 2018, 9:44am UTC](https://forums.suse.com/t/compose-yml-tpl-for-volume-names/8505/1 "2018-02-02T09:44:21Z")

</div>

Hello,  
I need to use secrets that are only supported in compose v2+, but i have a problem with volume name.

With v1 i can specify a volume name variable to be filled per catalog:  
${name\_or\_path}:/container/path

And that’s very cool i can use volume name if using nfs or path if using local driver.

Unfortunately the new v2 way you have to specify the name in volumes so a thing like this:  
volumes:  
${name\_or\_path}:  
external:true  
Isn’t working anymore, cause i’m using a key as variable…  
Is there any way to use the .tpl to avoid this problem?  
Thanks.
