Environments
An environment groups what changes from one place where the automation runs to another: addresses, usernames and passwords. With environments, the same automation runs in staging and in production without changing the datasets or the code.
Environments are in Automations > Environments.
How a run picks the environment
- The environment chosen when the run is started applies (on screen, in the scheduled run, in the recurring run or through the AI connector).
- If none was chosen, the default environment of each dataset applies.
- Without either, the run has no environment, and the code does not receive the variables.
Rerunning a failure uses the same environment as the run that failed.
The automation code reads the variables by name, with the Proton Cloud SDK.
Create an environment
New environment asks for:
- Name, unique in the organization (for example, Staging, Production);
- Description, optional;
- Production, turned on when the environment is a production one: starting a run warns you before running in it;
- Variables, when creating: start without variables or copy them from another environment. The copy brings the names, the descriptions and the plain values; secrets come empty, so you can type the ones for this environment.
Create from this one, in an environment's details, comes with the copy already chosen.
Variables
In the Variables tab:
- New variable asks for the Name (starts with a letter; then letters, numbers,
_,.or-; unique in the environment), the Value and the Description. - Secret encrypts the value: it no longer appears on screen, and only the run receives it. To change it, type the new value; to make it no longer a secret, do the same.
The environment details warn you when variables that exist in other environments are missing: code that asks for one of them here will not find it. Click the warning to create it.
Datasets
The Datasets tab shows the datasets that have this environment as their default.
- Associate datasets sets this environment as the default for the checked datasets. Checking an automation checks all of its datasets.
- Remove from this environment leaves the dataset with no default environment.
The default environment can also be set when editing the dataset and with the Set environment bulk action in the datasets list.
Delete
An unused environment is deleted along with its variables. If datasets or recurring runs use the environment, Proton asks what takes its place: another environment or none (Delete and replace).
History
The history icon shows each change to the environment and its variables. Secrets appear masked.
Permissions
Viewing, creating, changing and deleting environments have their own permissions in the profile (Environments). Creating, changing and deleting variables requires changing environments; associating datasets requires changing datasets.