Display conditions
Permissions
Translations

Variables

You can use environment variables in your manifest for entire or partial field values. The Forge CLI reads these values from the process environment when executing any command.

An environment variable must first be declared in environment.variables before it can be used elsewhere in the manifest file:

1
2
environment:
  variables:
    - VARIABLE
    - VARIABLE2

Properties

PropertyTypeRequiredDescription
variablesArray<string>No

A list of strings, each matching the regex ^[a-zA-Z_][a-zA-Z0-9_]*$ that indicate which substrings used throughout the manifest.yml can be replaced with the corresponding environment variable value from the current process.

Example

First, export your APP_ID as an environment variable:

1
2
export APP_ID=406d303d-0393-4ec4-ad7c-1435be94583a

Afterwards, you can specify it in your manifest file:

1
2
app:
  id: "ari:cloud:ecosystem::app/${APP_ID}"
environment:
  variables:
    - APP_ID

Forge CLI commands that read the manifest will convert the variable APP_ID as follows:

1
2
app:
  id: "ari:cloud:ecosystem::app/406d303d-0393-4ec4-ad7c-1435be94583a"
environment:
  variables:
    - APP_ID

Rate this page: