Composable templates- how to convert Legacy?

How do I convert this to the new composable templates without breaking my ILM config?

PUT _template/99999-test_deleteme_policy
{
"index_patterns": [
"99999-test_deleteme-*"
],
"settings": {
"index": {
"number_of_shards": 5,
"number_of_replicas": 1,
"lifecycle.name": "99999-test_deleteme_policy",
"lifecycle.rollover_alias": "99999-test_deleteme"
}
}
}

I believe that something like this should work:

PUT _index_template/99999-test_deleteme_policy
{
  "index_patterns": ["99999-test_deleteme-*"],
  "template": {
    "settings": {
      "number_of_shards": 5,
      "number_of_replicas": 1,
      "lifecycle.name": "99999-test_deleteme_policy",
      "lifecycle.rollover_alias": "99999-test_deleteme"
    }
  },
  "priority": 100
}
1 Like

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