Is it possible to set app wide env vars and then i...
# seed
g
Is it possible to set app wide env vars and then if needed override the value per stage? Similar to how serverless.com allows?
t
Yes you can use
app.setDefaultFunctionProps({ environment: {} })
for app defaults
then later can do things like
Copy code
if (app.stage === "dev") { app.addDefaultFunctionEnv({})
g
I meant on seed not sst
t
lol I just was about to say, I didn't realize I was in the #seed channel
f
@Garret Harp, currently there isn’t a way. But I will add that to our roadmap.
Btw, just curious if you are going to have multiple apps on Seed, and does it make sense to set the env var on the app level or the org level (ie. npm token, stripe token, etc)
g
I personally will only ever have one app just using a monolith repo with multiple services in it, but I could see it being useful to have both in some contexts a variable might be important to only one specific app but in another it might be useful across all of them.