Skip to navigationSkip to main contentSkip to footerScaleway Docs HomepageAsk our AI
Ask our AI

Injected environment variables

Use environment variables

The following environment variables are injected by default in the workflow runs to improve and optimize data management.

Variable nameDescriptionSample value
regionRegion of the workflow runfr-par
organizationIdID of the Organization of the workflow00000000-0000-0000-0000-000000000000
projectIdID of the Project of the workflow00000000-0000-0000-0000-000000000000
workflowDefinitionIdID of the workflow definition00000000-0000-0000-0000-000000000000
workflowDefinitionNameName of the workflow definition"dor-workflow-name"
workflowVersionIdID of the workflow version00000000-0000-0000-0000-000000000000
workflowRunIdID of the workflow run00000000-0000-0000-0000-000000000000
triggerTypeType of trigger that launched the workflow runmanual or scheduled

To reuse these environment variables, use the syntax ${ $workflow.<ENVIRONMENT_VARIABLE> }. In the following examples, replace the placeholders with the appropriate values.

do:
  - <TASK_NAME>:
      if: ${ $workflow.workflowDefinitionName == "<DOR_WORKFLOW_NAME>" }
      call: serverless_job
      with:
        id: "<SERVERLESS_JOB_ID>"
        region: "<REGION>"

When a workflow executes a Serverless Job, the environment variables are injected into the job with the following format:

  • SCW_WOFL_REGION
  • SCW_WOFL_ORGANIZATION_ID
  • SCW_WOFL_PROJECT_ID
  • SCW_WOFL_DEFINITION_ID
  • SCW_WOFL_DEFINITION_NAME
  • SCW_WOFL_VERSION_ID
  • SCW_WOFL_RUN_ID
  • SCW_WOFL_TRIGGER_TYPE

Environment variables priority

When the same environment variable is injected by multiple sources, the Scaleway infrastructure follows a precedence rule to determine the value for that variable.

The order of precedence, from highest to lowest is the following.

  1. Environment variables defined in your command-line environment.

  2. Static variables (i.e. variables set in a Terraform/OpenTofu configuration file).

  3. Variables defined in the Scaleway SDK configuration file or Scaleway CLI configuration file.

Still need help?

Create a support ticket
No Results