Hi everyone, does anyone have any advice around st...
# general
s
Hi everyone, does anyone have any advice around stack management for a single project where variables are injected depending on which stack is selected (dev/test/staging/prod). I'm trying to avoid having multiple typescript files for each stack, but instead inject environment specific variables. Is there any best practices or docs I can follow to achieve this?
l
If you want to use your OS environment instead of pulumi.Config, then use your preferred language's environment-accessing features.
You can choose between (for example) DEV_PORT and STAGING_PORT based on the value of
pulumi.getStack()
.
You will be essentially re-inventing the wheel though, since that's exactly what Pulumi config is for.
s
Okay sounds like I should do some more investigation into that, cheers.