https://pulumi.com logo
Title
g

gorgeous-minister-41131

01/19/2023, 1:18 AM
This probably has been answered a bunch of times, but now with some namespaced/hierchiaal configuration, we can define project-level config in addition to stack level. Yay. I have a question about global / shared configuration. How are folks managing configuration that is shared amongst multiple stacks? One 'hack' in Terraform I used to do was to make a module whose sole purpose was to
output
things I wanted other modules or states to be able to re-use. Is this something one could do in pulumi as well using
pulumi.Output()
and a bunch of namespace configs?
l

little-cartoon-10569

01/19/2023, 2:04 AM
Yes, you can do this. Or you can use any other configuration technology; your preferred language may have a better way of sharing configuration "above" stack level. If you want to use Pulumi's provided configuration features, you wouldn't use
pulumi.Output()
specifically (though that would be used in the implementation). You would use a separate project, probably with only one stack (or at least, very few). And you would get shared configuration from that project/stack through stack references.
e

echoing-dinner-19531

01/19/2023, 11:23 AM
Note we do have plans to extend project config to also support global config: https://github.com/pulumi/pulumi/issues/11550
g

gorgeous-minister-41131

01/19/2023, 9:21 PM
Excellent thank you both for the input. For the time being, I was going to do the meta-project approach that you mentioned @little-cartoon-10569 (I think that's how I originally was trying to explain this so we both are thinking the same thing). This meta-project would just have a single stack that defines a bunch of namespaced config, that just does a bunch of
pulumi.export()
on. This could be a simple stop-gap until global configuration becomes a thing as Fraser mentioned and shouldn't be too hard for me to switch away from.