Environment groups
An environment group is a named bundle of variables you define once and attach to many services. When several services share configuration — an API key, a shared endpoint, a feature flag — a group keeps them in sync instead of copying the same values everywhere.
Why groups
Section titled “Why groups”- Edit once, apply everywhere — change a value in the group, redeploy the attached services, and they all get the update.
- Consistency — no drift between services that should share the same setting.
- Cleaner services — a service’s own Variables tab only holds what is unique to it.
Create and attach
Section titled “Create and attach”- Create an environment group and add its
KEY=valuepairs. - Attach it to a service from that service’s Variables tab (or attach it while creating the service).
- Deploy the service to pick up the group’s values.
Groups are account-scoped — they belong to your workspace and can be attached to any service in your projects.
Precedence
Section titled “Precedence”When the same key is defined in more than one place, the most specific wins. From lowest to highest priority:
- Environment group values
- The service’s own variables
- References from other services
So a variable set directly on a service overrides a group’s value, and a reference overrides both. This lets a group provide defaults that individual services can selectively override.
Editing
Section titled “Editing”Change a value in the group and it takes effect for every attached service on their next deploy. Removing a group from a service drops its values from that service (again, on the next deploy).
- Set per-service values in Environment variables.
- For file-shaped secrets, use Secret files.