nais job set env

nais job set env NAME ENV_VARS [ENV_VARS...] [flags]

Updates environment variables on the job. Use KEY=VALUE to set and KEY- to remove. Changes are temporary and will be overwritten on next deploy.

Inherited options

--config
Specify the PATH to the configuration file.
--confirm-login
Ask for confirmation before starting required login flows. Interactive terminals only.
-e, --environment
Select or filter by Nais ENVIRONMENT, for example dev-gcp or prod-gcp. Overrides the environment configured with nais defaults set environment.
--no-colors
Disable colors in the output.
-t, --team
Select the Nais TEAM that owns the resources. Overrides the team configured with nais defaults set team.
-v, --verbose
Set verbosity level. Use -v for verbose, -vv for debug, -vvv for trace.

Examples

# Set environment variables.
$ nais job set env my-job FOO=bar BAZ=qux -e dev

# Remove an environment variable.
$ nais job set env my-job FOO- -e dev

# Set and remove in one command.
$ nais job set env my-job NEW_VAR=hello OLD_VAR- -e dev