Logo

Command Palette

Search for a command to run...

env-vars set

Adds (or updates) a single environment variables for your application. You can use the --apply-strategy option to specify when Cloud 66 will apply the change in environment variables to your servers. The default is immediately.

$ cx env-vars set --stack <application name> [--apply-strategy] <key> <value> 

Options

ArgumentRequired?DefaultDescription
--stack, -s <application name>yesName of your application
<key>yesThe KEY for the env-var that will be added or updated
<value>yesThe value assigned to the KEY
--apply strategynoimmediatelyWhen the changes will be applied. Options are immediately, deployment

Examples

$ cx env-vars set -s mystack FIRST_VAR=123
$ cx env-vars set -s mystack SECOND_VAR='this value has spaces in it'
$ cx env-vars set -s mystack --apply-strategy immediately THIRD_VAR='value-applied-now'
$ cx env-vars set -s mystack --apply-strategy deployment FOURTH_VAR='value-after-deployment'