Automatically create role based on index

Apologies, but I'm not sure I follow this. Could you try to elaborate or add a more concrete example ?

If you mean internally to elasticsearch, no. There is no functionality to trigger role creation based on index creation and there is no template option for roles that would take into consideration the index name. One possibility might be to have a watch with a short trigger that would perform a search as input and then use the webhook action to call the Create Role API to add the role you want. I haven't done something similar before but it looks possible.