Core Plugins and tasks SetVariables

Core Plugins and tasks SetVariables

Certified

Set execution-scoped variables.

Renders a map and merges it into the execution variables, making them available via {{ vars.* }}. By default, existing keys are overwritten; set overwrite to false to fail when a key already exists.

Deep merges preserve nested maps rather than replacing them entirely.

yaml
type: io.kestra.plugin.core.execution.SetVariables

Set variables

yaml
id: variables
namespace: company.team

variables:
  name: World

tasks:
  - id: set_vars
    type: io.kestra.plugin.core.execution.SetVariables
    variables:
      message: Hello
      name: Loïc
  - id: hello
    type: io.kestra.plugin.core.log.Log
    message: "{{ vars.message }} {{ vars.name }}"
Properties

The variables

Defaulttrue

Flag specifying whether to overwrite existing variables

Reference (ref) of the pluginDefaults to apply to this task.