Deployment environment variables
CloudCode version compatibility
To use deployment environment variables, please upgrade your CloudCode task to version 1.11.1.
You can set up environment variables per deployment. These env variables are accessible from CloudCode tasks.
To create a new environment variable, open the Deployment settings for a specific deployment, and go to the Environment Variables tab.
Then create the environment variable on each deployment you need it with the corresponding value.
Sensitive environment variables can be masked as follows:
You can clone variables from other deployments to save time. Note, however, that masked variables cannot be cloned.

Using environment variables in CloudCode

Environment variables are available in CloudCode using the following syntax:
In other words, for the example in the screenshot above, you can use the following to access the xyz_app_credentials environment variable:
When the CloudCode task runs in a specific deployment, it will read the value of the environment variable that is saved in the deployment settings for that deployment.
Copy link