# Placeholders within \`index.lifecycle.rollover\_alias\` to generalize index templates?

**URL:** https://discuss.elastic.co/t/placeholders-within-index-lifecycle-rollover-alias-to-generalize-index-templates/296001
**Category:** Elasticsearch
**Tags:** ilm-index-lifecycle-management
**Created:** [February 1, 2022, 8:58pm UTC](https://discuss.elastic.co/t/placeholders-within-index-lifecycle-rollover-alias-to-generalize-index-templates/296001 "2022-02-01T20:58:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![gburtenshaw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gburtenshaw/32/101194_2.png) [@gburtenshaw](https://discuss.elastic.co/u/gburtenshaw)
#### Post date: [February 1, 2022, 8:58pm UTC](https://discuss.elastic.co/t/placeholders-within-index-lifecycle-rollover-alias-to-generalize-index-templates/296001/1 "2022-02-01T20:58:00Z")

</div>

Our data is indexed on a per customer basis... for example, customer `abc`, `xyz`, etc...

We are trying to use ILM rollover on these indices. The data is mutable nor is it strictly time based, so we are not using data streams.

As such, we need to include `index.lifecycle.rollover_alias` in the template.

I have the "static" format working:

```auto
PUT _index_template/test-ilm
{
  "priority": 300,
  "index_patterns": [
    "abc-*"
  ],
  "template": {
    "settings": {
      "number_of_shards": 1,
      "number_of_replicas": 1,
      "index.lifecycle.name": "test_policy",
      "index.lifecycle.rollover_alias": "abc"
    }
  }
}

```

But this requires an `_index_template` per customer which is rather impractical (and I'm not sure if there is a performance consideration from having a large number of them) - Wondering if there was a way to generalize it down to a single template definition?

I am aware of the `{index}` placeholder - but that doesn't help in this scenario. Unless there is a way to extract parts of that placeholder?

I have found past discussions on this very topic but can't determine where things currently stand as of v7.16

Thanks,

---

<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 1, 2022, 8:58pm UTC](https://discuss.elastic.co/t/placeholders-within-index-lifecycle-rollover-alias-to-generalize-index-templates/296001/2 "2022-03-01T20:58:14Z")

</div>

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