Toggle environment group for previews

I’m trying to set up blueprints to be able to deploy a whole preview env and I’d like to be able to simply toggle which env group to use rather than toggling individual env vars. This also seems to make more sense than your examples which show toggling individual vars within the render.yaml file as this would mean including those sensitive keys in version control…

For example, you can imagine I have several environment groups defined outside of the render.yaml file

  • api-prod (has my production keys and any prod settings)
  • api-staging (has dev/test keys and other staging settings)

and then in the render.yaml, something like

envVars:
  - fromGroup:
      value: prod-env
      previewValue: staging-env

Please let me know best practices for this situation and if I’m missing something obvious.

Thanks!

Hi Theo,

We have an open feature request for this [here] (https://feedback.render.com/features/p/enable-preview-environment-group-override) that you can upvote to receive updates and help us prioritize. There are also a few strategies outlined in the request that might give you some idea of how others have achieved this.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.