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
little-cartoon-10569
09/07/2021, 3:14 AM
If you want to use your OS environment instead of pulumi.Config, then use your preferred language's environment-accessing features.
little-cartoon-10569
09/07/2021, 3:15 AM
You can choose between (for example) DEV_PORT and STAGING_PORT based on the value of
pulumi.getStack()
.
little-cartoon-10569
09/07/2021, 3:15 AM
You will be essentially re-inventing the wheel though, since that's exactly what Pulumi config is for.
s
salmon-printer-16080
09/07/2021, 3:16 AM
Okay sounds like I should do some more investigation into that, cheers.