cball / netlify-plugin-contextual-env

A Netlify plugin to override ENV vars based on a branch or context
56 stars 13 forks source link

Is this plugin also supposed to work for environment variables in Netlify's serverless functions? #26

Open princefishthrower opened 2 years ago

princefishthrower commented 2 years ago

I see this plugin does the environment variable contextualizing specifically at build time, but I guess I also expected it to work for my serverless functions. However, after a few tests, the staging instances of my serverless functions are indeed using the production environment variables. So I'm not sure if this just isn't in the scope of this package, or if this is a bug report.

jeslenbucci commented 2 years ago

Having the exact same issue.

jeslenbucci commented 2 years ago

Also, this might be helpful since it's baked into Netlify now via Labs: https://www.netlify.com/blog/branch-specific-environment-variable-values-from-the-netlify-ui-cli-or-api/

princefishthrower commented 2 years ago

@jeslenbucci - oh wow, that's huge! Wonder how long it takes before they move it out of beta, but I'll probably activate labs for my account anyway 😄