Product
February 07, 2024

New Controls for Shared Service Config

Stephen Barlow
Render environment groups are a handy tool for sharing config across multiple services: you create a group, define some environment variables in it (like, say, a REDIS_URL and an API_KEY), then link that group to any number of different services. Whenever you edit the group, Render updates the config for each linked service automatically. Now, environment groups are even more handy (and secure) thanks to integration with your team's Render projects. You can now restrict an environment group to a single environment within one of your team's projects. This means that only services in that environment can receive the config from that group: By restricting an environment group like this, you remove the possibility of accidentally providing your production database URL to a staging service, or vice versa. One less thing to worry about!

Setup

To move an environment group to a project environment, open that group in the Render Dashboard and click Manage > Move group. Select your project and environment, then click Move env group: You're all set! The environment group is no longer linkable to any service that doesn't belong to that environment. A couple items to note:
  • You can't restrict an environment group if it's already linked to a service that isn't in the destination environment. You'll need to unlink those services first, or create a duplicate of the group.
  • You can always link unrestricted environment groups to any of your services, including services in a project environment.

Try setting up environment-specific config for your team! And if you don't yet have a team, you can still start creating environment groups to share config across your services.