st2 icon indicating copy to clipboard operation
st2 copied to clipboard

Multiple Policies to Govern a single Action/Workflow

Open jpavlav opened this issue 11 months ago • 0 comments

I've noticed that it's not possible to have multiple policies for a single action/workflow. This is something that would be really useful. Imagine a workflow that has a user and host input, token example. I'd like to be able to do something like:

policies/my_action_hosts.yaml

name: my_pack.my_action.host.concurrency
description: control concurrency of `my_action` by host
resource_ref: my_pack.my_action
parameters:
  action: cancel
  threshold: 1
  attributes:
    - hosts

policies/my_action_user.yaml

name: my_pack.my_action.host.concurrency
description: control concurrency of `my_action` by host
resource_ref: my_pack.my_action
parameters:
  action: cancel
  threshold: 5
  attributes:
    - user

@cognifloyd @nzlosh do y'all think this is something that might be useful? I'd be interested in contributing to it, if it's possible. Would need to get a dev environment for st2 proper set up.

jpavlav avatar Mar 05 '25 14:03 jpavlav