When writing CDK, I find myself wanting to use environment variables locally (e.g. .env.local), but use ssm for long lived environments like stage/prod.
Prioritizing env variables over parameter store values seems like a common pattern. Before I go writing a method to do this, is there a common recipe or util available for this purpose?
t
thdxr
03/10/2022, 4:32 PM
I do this in my ssm loader code, it checks to see if there's a matching env and uses that
thdxr
03/10/2022, 4:32 PM
we're getting close to releasing this as part of SST we just need to make some final decisions
s
Seth Geoghegan
03/10/2022, 4:32 PM
I thought you were going to say "use SSM for everything" 😆
t
thdxr
03/10/2022, 4:33 PM
haha well use ssm for everything but sometimes you need to flip a value for a bit and env tends to be easy
thdxr
03/10/2022, 4:33 PM
I still recommend using ssm for the majority of the time, personally hate managing .env files