PR version of envVarGroup is missing keys that have sync: false

Ah, I was also just bitten by this too!

Was very surprised that my env vars specified in an env var group with sync: false were not synced given this line from the docs:

Render currently doesn’t support copying sync: false environment variables into preview environments unless those variables are part of an environment group.
Preview Environments | Render Docs

To me this very much made it sound like if I specified a list of env vars with sync: false in my render.yaml for an existing env var group, it’d “do the right thing” and automatically pick up those vars in my preview environment too.

I will try the workarounds suggested but hope it is possible to improve the default behaviour around this in the future (without breaking deploys for users whose current setup somehow relies on the current confusing default).

2 Likes

If you create the Env Group via the UI, how can you set a previewValue to override it? That option isn’t available via the UI?

Does this mean you can’t mix sync: false and previewValue since getting the former to work right requires you do it via the UI and the latter requires the IAC approach?

You’re correct in that previewValue does not work in EnvVarGroups and similarly sync:false won’t work either.

We have some work in progress which will hopefully improve things for getting vars into environments. Right now, the workaround is to great a env var group manually in the dashboard and then use it from your service.

Regards,

John B