Index Management supporting transform job as there action

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

Describe the issue: Our goal is to make a transform job that runs just one day before the deletion of index . currently working solution is the we can put let suppose min_index age as 7d for deletion and in transform job what we can do is now-7d in data_selection_query but our objective is to make now-7d as dynamic it can now-{{retention_period}} so we are trying to figure out the ways such that after a particular index age which can be anything we will run that particular transform job

@gourabh09 The data_selection_query is parsed directly as a query DSL with no template compilation step, therefore now-{{retention_period}} or similar patterns won’t be evaluated.

The possible workaround would be:

  1. Use the ISM API to programmatically update the policy (re-PUT the policy JSON with the correct date math) whenever your retention period changes.
  2. Use date math directly in the query (now-7d) and update manually when retention changes.

I would recommend to open a github issue here for this.

@Anthony we will be changing the minimum index age to perform any action (example deletion) then based on that we need to data_selection_query in our transform job