# Change template and ILM policy from an existing Datastream

**URL:** <https://discuss.elastic.co/t/change-template-and-ilm-policy-from-an-existing-datastream/296608>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management, datastreams\
**Created:** [February 8, 2022, 1:52pm UTC](https://discuss.elastic.co/t/change-template-and-ilm-policy-from-an-existing-datastream/296608 "2022-02-08T13:52:55Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 11, 2022, 2:03pm UTC](https://discuss.elastic.co/t/change-template-and-ilm-policy-from-an-existing-datastream/296608/7 "2022-02-11T14:03:51Z")

</div>

If your policy has a rollover you can't apply it manually to index, you need to use templates.

Check this answer to your other [post](https://discuss.elastic.co/t/switching-policies-for-an-index/296200/5).

When you have a rollover in a policy, do not change the policies manually, change it in the templates and let the template take care of the change.

---

_[View the full topic](https://discuss.elastic.co/t/change-template-and-ilm-policy-from-an-existing-datastream/296608)._
