Environments
Model runtime boundaries, configuration readiness, and environment lifecycle.
An environment is a runtime boundary inside one project. Flags have independent fallbacks, rules, client exposure, and emergency state in each environment. Evaluation keys bind to one environment.
Use environments for deployed boundaries that need independent values and credentials. Do not use them as a promotion queue, release checklist, or substitute for deployment automation.
development, staging, and production are useful defaults when they match real runtime stages.
Create custom environments only when they correspond to another durable runtime boundary.
| Model | Use it when | Avoid it when |
|---|---|---|
| Standard environments | The application has development, staging, and production | Those names do not map to real runtimes |
| Regional environment | Regions are deployed and operated independently | Region is only a targeting attribute |
| Preview environment | It is a durable runtime with owned credentials | A short-lived branch can use bootstrap data |
FeatureGate does not copy configuration from staging to production. Apply each production change deliberately so a non-production experiment cannot become production configuration accidentally.
Environment keys are immutable because credentials, audit events, and URLs depend on them. Use a stable machine key and reserve the display name for wording that may change.
Creating an environment seeds configurations for existing flags. Review the generated values before traffic. A ready environment progresses through these states:
An all-off fresh environment is not automatically risky before it serves traffic. After the first hosted request, fallback review becomes operationally relevant.
Client keys add two requirements: allowed origins and explicit client exposure on each flag. A client key does not make every environment flag browser-readable.
Open the project Environments page and select an environment by its URL path. Create, list, and revoke runtime keys from that boundary. Raw secrets are shown once and cannot be recovered.
Missing configurations can occur after deliberate unconfiguration. A configured boolean false
differs from a missing configuration: false is a valid result and may still be overridden by rules.
Archive is reversible and prevents new normal use while preserving history. Restore the environment before creating keys or changing active configuration.
Permanent deletion is available only after archive. Before deletion, replace callers, confirm safe caller defaults, and allow snapshot clients to refresh or shut down.
A running SDK may retain its last successful in-memory snapshot until refresh, restart, or shutdown. An environment lifecycle change is not a remote memory wipe.
refresh().Related pages: Evaluation credentials, Environment readiness, and Configure flags across environments.