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.
It may be only me, but I didn’t understand the example given on the link, about the environments getting/not getting copied in the preview environment. A detailed example would be super helpful!
Hi there, apologies for the delayed response, maybe I can explain the example a bit more. For certain environment variables you have the option to label them sync: false this allows you to enter a value for those variables when you deploy your main service for the first time. When using preview environments, the environment variables with these labels won’t be automatically copied from the main service to the preview environment. The way you achieve copying those variables to the preview environment is by creating an environment group with the variables that you want copied. That said, there is a known issue with this right now and the recommended way to manage environment variables with preview environments is to create an environment group using the dashboard and then reference that group in your render.yaml using fromGroup: <group name>