# Creating a default template as part of deployment

**URL:** <https://discuss.elastic.co/t/creating-a-default-template-as-part-of-deployment/124574>\
**Category:** Elasticsearch\
**Created:** [March 19, 2018, 2:30pm UTC](https://discuss.elastic.co/t/creating-a-default-template-as-part-of-deployment/124574 "2018-03-19T14:30:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymouslemming](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@anonymouslemming](https://discuss.elastic.co/u/anonymouslemming)\
**Post date:** [March 19, 2018, 2:30pm UTC](https://discuss.elastic.co/t/creating-a-default-template-as-part-of-deployment/124574/1 "2018-03-19T14:30:41Z")

</div>

Hi all,

I'm deploying a new Elasticsearch application, and I'm trying to enforce some settings (such as replica shard count) as part of deployment.

I know that I can create / update a template to set this value, but the problem is that by the time I've done this, other apps may have already started and created indexes with a different value.

What's the correct way to create templates that are in place before the first startup of elasticsearch ?

Thanks,

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 16, 2018, 2:31pm UTC](https://discuss.elastic.co/t/creating-a-default-template-as-part-of-deployment/124574/2 "2018-04-16T14:31:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
