St2: Config values from workflows

Created on 3 May 2017  路  10Comments  路  Source: StackStorm/st2

Would be really handy being able to read the values defined in a pack configuration file directly from a workflow definition; at the moment the only way I found to use configuration values in a workflow is to add the needed values in the output of an action and then publish them in the workflow'...in this way works but is not really a clean solution.

feature

Most helpful comment

As a workaround, until this is implemented, you can use the config_context in your workflow's action metadata to a default value from the config

Example:

parameters:
    config_username:
        type: "string"
        description: "Username from the pack's config"
        required: true
        immutable: true
        default: "{{ config_context.username }}"

All 10 comments

@diellenne you should keep an eye on this PR https://github.com/StackStorm/st2/pull/3183 - I think that will address your requirements?

If it's also supporting Mistral, yes! :)

it would be a useful feature for our workflows too

As a workaround, until this is implemented, you can use the config_context in your workflow's action metadata to a default value from the config

Example:

parameters:
    config_username:
        type: "string"
        description: "Username from the pack's config"
        required: true
        immutable: true
        default: "{{ config_context.username }}"

+1 on this, @Thibault in Slack just asked for this feature (config context in mistral workflow)

No I did'nt :) Wrong @thibault.

+1 dalord on Slack just asked for this

+1, this would be great.

Maybe not @thibault, but @lemeur (who is a Thibault... nobody's perfect)
So I vote +1

+1 ! What is the status on this?

Was this page helpful?
0 / 5 - 0 ratings