# Elasticsearch Policy

**URL:** <https://discuss.elastic.co/t/elasticsearch-policy/353741>\
**Category:** Elasticsearch\
**Created:** [February 21, 2024, 2:12am UTC](https://discuss.elastic.co/t/elasticsearch-policy/353741 "2024-02-21T02:12:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Myungji\_Kim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/myungji_kim/32/131954_2.png) [@Myungji\_Kim](https://discuss.elastic.co/u/Myungji_Kim)\
**Post date:** [February 21, 2024, 2:12am UTC](https://discuss.elastic.co/t/elasticsearch-policy/353741/1 "2024-02-21T02:12:51Z")

</div>

Hello,  
I am currently using Elasticsearch v 7.10.2. For the indexes that are created, the policy is applied by creating a policy in the state management policies and applying policy to the indices. Is there a way to apply a policy to a new index created every specific day without applying policy?

We will inform you of the policy we have applied as follows.  
{ "policy\_id": "PRD\_fota-admin-mon-new\_90ddeletepolicy", "description": "Demonstrate a hot-delete workflow.", "last\_updated\_time": 1683518400067, "schema\_version": 1, "error\_notification": null, "default\_state": "hot", "states": [{ "name": "hot", "actions": , "transitions": [ { "state\_name": "delete", "conditions": { "min\_index\_age": "90d" } }] }, { "name": "delete", "actions": [

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [February 21, 2024, 10:34am UTC](https://discuss.elastic.co/t/elasticsearch-policy/353741/2 "2024-02-21T10:34:13Z")

</div>

Hi @Myungji_Kim,

Welcome! Did I understand correctly that you want to apply the policy to newly created indices automatically?

I would recommend having a look at using [index templates](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/getting-started-index-lifecycle-management.html#ilm-gs-alias-apply-policy) to apply the policy to a particular index pattern.

Hope that helps!

---

<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:** [March 20, 2024, 10:34am UTC](https://discuss.elastic.co/t/elasticsearch-policy/353741/3 "2024-03-20T10:34:53Z")

</div>

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