Do variables in ENV groups override regular ENV variables?

Use case:

I would like to use the same YAML file to generate a staging env and a prod env. I would like the following behavior:

  1. I put the ENV group in the YAML file
  2. I put all the relevant ENV variables in the group
  3. I override some ENV variables in the specific services

The staging and the prod env both have the variables from the env group, and the specific variables for each service override the ones in the group.

The documentation really should say how we determine what takes priority on what.

Hi @Trevoke,

I believe this is a great use case for Render’s Preview Environments Preview Environments | Render · Cloud Hosting for Developers. With Preview Environments you are able to override environment variables and use environment groups to propagate sync: false environment variables for those preview environments in a single YAML file.