# ILM Policy not sticking to index template

**URL:** <https://discuss.elastic.co/t/ilm-policy-not-sticking-to-index-template/269940>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [April 12, 2021, 7:08pm UTC](https://discuss.elastic.co/t/ilm-policy-not-sticking-to-index-template/269940 "2021-04-12T19:08:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leemase004](https://avatars.discourse-cdn.com/v4/letter/l/fbc32d/32.png) [@leemase004](https://discuss.elastic.co/u/leemase004)\
**Post date:** [April 12, 2021, 7:08pm UTC](https://discuss.elastic.co/t/ilm-policy-not-sticking-to-index-template/269940/1 "2021-04-12T19:08:19Z")

</div>

We have created an ILM (ex. ILM-1) and have attached it to an index-template (ex. Index-1).

However, whenever the index rolls over it for some reason grabs a different, random ILM policy.

We will go back to attach the ILM again; however, when we do, Elastic will state "ILM-1 is already attached to Index-1. Do you wish to overwrite?"

So it appears Elastic is aware that ILM-1 is attached to Index-1, but when it rolls over it is not applying the ILM.

Is this a well known issue? Is there a quick remedy/fix? We are on version 7.6.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 12, 2021, 9:36pm UTC](https://discuss.elastic.co/t/ilm-policy-not-sticking-to-index-template/269940/2 "2021-04-12T21:36:59Z")

</div>

Please share your relevant policy and templates.

---

<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:** [May 10, 2021, 9:37pm UTC](https://discuss.elastic.co/t/ilm-policy-not-sticking-to-index-template/269940/3 "2021-05-10T21:37:23Z")

</div>

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