Now generally available: Scopes and contextual values for environment variables

Scopes and contextual values for environment variables are now generally available! These features are production-ready and can be used in all your sites today.

Scopes and contextual values are part of a new experience for environment variables. Netlify teams created after November 2, 2022 will get the new environment variables experience by default for all sites across their team. Existing teams can opt into the new experience on a site-by-site basis.

Scopes enable you to limit environment variables so that they can only be accessed by builds, functions, other runtime features, and/or post processing.

You can now also set different values for the same key on different deploy contexts. This includes built-in deploy contexts: production, Deploy Previews, branch deploys, and local development on the Netlify CLI. You can also change the value for specific branches.

Learn more on the blog post and please let us know what you think!

2 Likes

This topic was automatically closed after 14 days. New replies are no longer allowed.