Variables and Secrets
Configuration refers to values by name, such as a redirect URI or a client secret. Each environment holds its own value for each name. A value you set in staging never reaches production, even though both run the same version.
How Values Work
The control plane holds configuration, not values. A resource refers to a value by name, using a prefix that says which kind it is:
| Reference | Refers to | Example |
|---|---|---|
var:NAME | A variable, an ordinary value such as a client ID | var:APPLICATION_MY_APP_CLIENT_ID |
sec:NAME | A secret, such as a client secret | sec:APPLICATION_MY_APP_CLIENT_SECRET |
clientId: var:APPLICATION_MY_APP_CLIENT_ID
clientSecret: sec:APPLICATION_MY_APP_CLIENT_SECRET
Deploying a version never copies a value from one environment to another. Each environment replaces a reference with the value it holds under that name, from its own variables for var: and its own secrets for sec:.
- Variables hold values you can read, such as a URL or a client ID.
- Secrets hold values you can write but not read. The Console never shows a secret after you set it. To change one, type a new value.
For the full reference syntax, see Value References.
Set Values on an Environment
- In the Choreo Identity & Access Management Console, select your project in the project switcher in the header and go to Deployment pipeline. On the environment's card, click Open environment.
- Open Variables & secrets.
- Choose the Variables or Secrets tab. The tab names show how many values the environment holds.
- Click Set next to a name, enter the value, and save. Click Edit to change a value, or Remove to delete it.
Set Missing Values Before You Deploy
When a version refers to a name the environment does not hold, the deploy panel lists it under Values the environment needs, with a progress count such as 3 of 5 set. Set each one there, or on Variables & secrets, before you deploy. The panel shows All values set when none are missing.
A resource that refers to a missing value is refused by the environment. See Fix Refused Resources.
Values Changed Since the Last Deploy
Changing a value does not create a new version. The environment card shows how many values changed since the last deploy, and Values set since the last deploy lists them with the resources that use them. These values take effect with the next deploy.
To apply them without changing the version, click Redeploy. It deploys the version the environment already runs again, so the new values take effect.
Next Steps
Was this page helpful?