# Creating ILM in a automated way

**URL:** <https://discuss.elastic.co/t/creating-ilm-in-a-automated-way/209463>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [November 26, 2019, 10:05am UTC](https://discuss.elastic.co/t/creating-ilm-in-a-automated-way/209463 "2019-11-26T10:05:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ganesh2](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@ganesh2](https://discuss.elastic.co/u/ganesh2)\
**Post date:** [November 26, 2019, 10:05am UTC](https://discuss.elastic.co/t/creating-ilm-in-a-automated-way/209463/1 "2019-11-26T10:05:09Z")

</div>

Hi Team,

I'm trying to setup a Elasticstack in a automated way wherein i would like to automate configuring the ILM policy as well. I am referring to the link below for policy creation. [https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-index-lifecycle-management.html#ilm-gs-apply-policy](https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-index-lifecycle-management.html#ilm-gs-apply-policy)

All the references are pointed in a way that we create those templates by API calls. Is there a way that all these can be configured in a .yml & .JSON file. If so can you point me to those exact files and references please?

---

<div class="post-metadata">

**Author:** ![dakrone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dakrone/32/23351_2.png) [@dakrone](https://discuss.elastic.co/u/dakrone)\
**Post date:** [December 2, 2019, 3:39pm UTC](https://discuss.elastic.co/t/creating-ilm-in-a-automated-way/209463/2 "2019-12-02T15:39:48Z")

</div>

Hi Ganesh,

It is not possible to configure those settings (since they are index-centric) from a .yml or .json file. You'll need to configure them via the APIs.

---

<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:** [December 30, 2019, 3:39pm UTC](https://discuss.elastic.co/t/creating-ilm-in-a-automated-way/209463/3 "2019-12-30T15:39:49Z")

</div>

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