If I have multiple C# projects in Pulumi, can I sh...
# general
a
If I have multiple C# projects in Pulumi, can I share
Pulumi.*.yaml
files between them? Perhaps say by putting the file in a parent directory they all share in common?
m
Why would projects share stack configs? You can use Global project config per project, btw.
Pulumi.yaml
can have configuration that the stacks inherit.
a
My projects might share values.
So rather than re-specifying the same data structures in my yaml every time, I'd like to be able to define it once and just have them read that.
Common values like environment layout, regions, etc...
m
You might be desired a "shared project" with stack outputs and references pattern
e.g.
shared-projectname-infrastructure
standing up things like an ALB and secrets, parameters. Then you output their IDs, and use StackReferences in the "child" stacks to get the values.
a
Could see that working. A little convoluted, but it lets me specify things once and then I get strongly typed references going forward. Thanks 🙂
m
It's a recommended practice, fwiw
a
Dig it! 🙂