kestra-io / kestra

Infinitely scalable, event-driven, language-agnostic orchestration and scheduling platform to manage millions of workflows declaratively in code.
https://kestra.io
Apache License 2.0
7.66k stars 469 forks source link

Provide `taskrun.iteration` in ForEach task #4842

Open johnsturgeon opened 1 week ago

johnsturgeon commented 1 week ago

Feature description

I'm writing a flow that loops over a list of values using EachSequential and sets a KV Pair. I would like to name the key start_time_{index} where index would represent the loop counter / index.

Ben8t commented 1 week ago

ForEachItem already have taskrun.iteration

We should add it to ForEach, EachSequential, and EachParallel