Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: V3 - Add a getEnvVars function #1112

Open
nahtnam opened this issue May 18, 2024 · 0 comments
Open

feat: V3 - Add a getEnvVars function #1112

nahtnam opened this issue May 18, 2024 · 0 comments

Comments

@nahtnam
Copy link
Contributor

nahtnam commented May 18, 2024

Is your feature request related to a problem? Please describe.

No

Describe the solution you'd like to see

A function that a user can define called getEnvVars in the config. This function would be run on deploy (with process.env.NODE_ENV === 'production' and dev. Whatever the function returns is used as env vars for that deployment

Example function:

async function getEnvVars() {
  if (process.env.NODE_ENV === 'development') {
    return process.env // i use direnv to load env vars, this would expose those to trigger
  }
  
  const vars = await infisicalSDK.getEnvVars() // fake function, can be any third party service
  return vars
}

Describe alternate solutions

N/A

Additional information

https://discord.com/channels/1066956501299777596/1222172315152945283/1234572031803265166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant