Skip to content
Air-Cloud docs

Environments

A product runs in environments. Each one has its own data, secrets, release pointer and product host:

Creating a preview

aircloud environments create staging

A preview starts empty. It runs nothing until a release is activated in it:

aircloud release activate <release> --env staging

The name follows the environment grammar: lower-case letters, digits and single inner hyphens. production, ci and ci-<n> are refused, naming the name, before anything is sent. The platform also refuses a name whose product host would not fit one DNS label (host_label_too_long). A name the product already has is refused as conflict.

config/environments/<name>.toml overrides keys for the environment of that name, and config/environments/preview.toml overrides them for every preview. An overlay changes an environment that exists; it never creates one.

Listing them

aircloud environments list

prints each environment's name, kind (production or preview) and creation time.

Destroying a preview

aircloud environments destroy staging

erases the preview's data, secrets, release pointer and host. It cannot be undone, so the command asks you to type the environment's name first. Pass --confirm staging to confirm without a prompt, for example in a script. production and the platform's ci environments are never destroyed this way.

aircloud functions list counts the environments whose active release holds each function, so a function that lived only in a destroyed preview reads removed or undeployed once the preview is gone.