# BUG assigning ILM policy to \_index\_template

**URL:** <https://discuss.elastic.co/t/bug-assigning-ilm-policy-to-index-template/252034>\
**Category:** Elasticsearch\
**Created:** [October 14, 2020, 11:38am UTC](https://discuss.elastic.co/t/bug-assigning-ilm-policy-to-index-template/252034 "2020-10-14T11:38:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Petr.Simik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/petr.simik/32/38082_2.png) [@Petr.Simik](https://discuss.elastic.co/u/Petr.Simik)\
**Post date:** [October 14, 2020, 11:38am UTC](https://discuss.elastic.co/t/bug-assigning-ilm-policy-to-index-template/252034/1 "2020-10-14T11:38:14Z")

</div>

How I can assign ILM Policy to \_index\_template

I found this tutorial:

> **[Tutorial: Automate rollover with ILM | Elasticsearch Reference \[7.9\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-index-lifecycle-management.html#ilm-gs-apply-policy)**

I have version 7.9 and in older version (\_template) there was a button add policy to index template  
in recent version 7.9 \_index\_template is not visible from GUI

its the only way to do the assignment via settings and adding these 2 lines there?

```auto
      "index.lifecycle.name": "timeseries_policy",      
      "index.lifecycle.rollover_alias": "timeseries"

```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/6/76c57c9513e81380434c25a9f563084a6e85f338.png)

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [October 15, 2020, 3:22am UTC](https://discuss.elastic.co/t/bug-assigning-ilm-policy-to-index-template/252034/2 "2020-10-15T03:22:16Z")

</div>

you can do it via dev tools and [template api](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html).

or

stack management \> index management \> index templates \> your-index \> edit \> index settings

```auto
{
  "index": {
    "lifecycle": {
      "name": "ilm-name"
    },
    "number_of_shards": "1",
    "number_of_replicas": "1",
...
...
  }
}

```

---

<div class="post-metadata">

**Author:** ![Petr.Simik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/petr.simik/32/38082_2.png) [@Petr.Simik](https://discuss.elastic.co/u/Petr.Simik)\
**Post date:** [October 15, 2020, 12:41pm UTC](https://discuss.elastic.co/t/bug-assigning-ilm-policy-to-index-template/252034/3 "2020-10-15T12:41:19Z")

</div>

@AClerk, thank you. this was the question. Is this the only option.  
In older version there was a GUI click assignment option (as I added in picture).  
Now I have to copy the ILM + ALIAS into settings. So it seems Elastic give-up on this gui feature.  
thank u

---

<div class="post-metadata">

**Author:** ![Petr.Simik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/petr.simik/32/38082_2.png) [@Petr.Simik](https://discuss.elastic.co/u/Petr.Simik)\
**Post date:** [October 16, 2020, 7:17am UTC](https://discuss.elastic.co/t/bug-assigning-ilm-policy-to-index-template/252034/4 "2020-10-16T07:17:07Z")

</div>

@AClerk it is weird in index template creation Elastic did everything GUI based.  
I can click component\_template  
I can click data types

but assigning ILM is done by remembering and writing the text into text box field.  
It seems to me very inconsistent from end-user perspective.

---

<div class="post-metadata">

**Author:** ![Petr.Simik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/petr.simik/32/38082_2.png) [@Petr.Simik](https://discuss.elastic.co/u/Petr.Simik)\
**Post date:** [October 16, 2020, 5:06pm UTC](https://discuss.elastic.co/t/bug-assigning-ilm-policy-to-index-template/252034/5 "2020-10-16T17:06:27Z")

</div>

I suppose it is a BUG!  
from the documentation  
see [https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html)  
the first picture on recent documentation declares the option  
but this feature NOT WORKING!

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/5/0592ce8f80a06ce972a5d623a913530b66f2e2fe.png)

---

<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:** [November 13, 2020, 5:06pm UTC](https://discuss.elastic.co/t/bug-assigning-ilm-policy-to-index-template/252034/6 "2020-11-13T17:06:29Z")

</div>

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