Is there any way to create aliases for new (Future) index also in elasticsearch?

Hi Warkolm,

I have created the template with alias and it's working fine and alias created.

However, when trying alias filter with the template getting below error
"failed action with response of 400, dropping action:"

Anything wrong with this template?

Template :
curl -XPUT 'http://localhost:9200/_template/template_cpu' -d ' {
"template":"logstash-tools-alias-test-*", "order": 1,"settings":{"index.number_of_replicas":"1"},
"aliases" : { "alias-system-cpu" : {"filter" : { "term" : {"host.raw" : "xxx.xxx" } }, "routing" : "xxx.xxx"} }}'

Thanks,
Thiru.