Question for the Pulumi devs... If I'm using one ...
# general
a
Question for the Pulumi devs... If I'm using one pulumi project to deploy to multiple environments, how can I maintain the varying configuration for each of those environments? I need to be able to take the same project and stacks and just add some extra parameters from outside of the
Pulumi.yaml
and
Pulumi.*.yaml
which correspond to different, but structurally identical environments.
l
That's what the stack files are for, usually. The configuration in (for example) Pulumi.dev.yaml would be different to the configuration in Pulumi.prod-apac.yaml and Pulumi.prod-emea.yaml... or whatever suits your environments.
For "parameters from outside", you can look up external resources (files, vaults, environment variables, etc.) in the normal way. You can key those things by stack name, or get values from vaults specific to each environment (maybe even deployed by other projects with the same stack names) or whatever suits your needs
a
I think the recent-ish addition of variables to
Pulumi.yaml
makes this a little less painful and repetitious though, right?
l
Well, your question seems to be about variables which would have different values for different stacks, so that would necessarily rule out project-wide values. But for variables that are project-wide, Pulumi.yaml does make things DRYer, yes.
a
So what about variables with different values for different stacks?
That's the stack files?
l
Yes. That's what Pulumi configuration is for.