Rollover index with index management


I am trying to rollover an index if the index size reach 40GB. Below is the rollover policy I am using but its not working
Steps I followed-

  1. created new rollover policy as below
  2. assign the policy to the index pattern as below

but index is not being rollover even the criteria is met. Can someone please help me if I am missing anything else?
my goal is to roll over index to different index like index_name_02_09_2021_00001 and so on when the index size exceeds 40GB

rollover policy

    "policy": {
        "policy_id": "rollover_index",
        "description": "A  default that rolls indexes over at 40GB or 1 day.",
        "last_updated_time": 1612222733575,
        "schema_version": 1,
        "error_notification": null,
        "default_state": "active",
        "states": [
                "name": "active",
                "actions": [
                        "rollover": {
                            "min_size": "40gb",
                            "min_index_age": "1d"
                "transitions": []

Assign policy to index pattern

PUT _template/rollover_test
  "index_patterns": ["indexname-*"],
  "settings": {
    "opendistro.index_state_management.policy_id": "rollover_index"

I think that piece of documentation is missing the alias aspect, if you look at the create-index portion of the doc, there is a write alias associated with it: