The ES loader accepts a static string as an index name in the .conf file. This works, of course, but makes it more challenging to rotate data than if the date could be appended to the index name. Is there a way to get the current system time from the environment and append it in real time? I’m already using env vars for the environment and type (‘good’ or ‘bad’): {ENVIRONMENT}"-enriched-"{RECORD_STATUS} and this works great. It’s pulling values from ECS via Terraform tfvars and/or docker-compose. Now I’m trying to encapsulate a simple date function in an additional env var interpolation, something like ${LocalDate.now()}
(to try to eval a Java func) or ${(date)}
(Linux date) but neither works. This may be a long shot to begin with because I’m guessing the loader app config is only evaluated once at startup, but maybe that’s enough to sneak an expression in for recurring evaluation?
Just curious if anyone else has tried this and succeeded. It means the difference between dropping an index wholesale (a simple DELETE call or AWS ES ISM policy) and deleting records by querying and comparing derived_tstamp, which is somewhat significant.