https://pulumi.com logo
#general
Title
# general
a

able-camera-57198

07/24/2023, 1:41 PM
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

millions-furniture-75402

07/24/2023, 1:43 PM
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

able-camera-57198

07/24/2023, 1:49 PM
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

millions-furniture-75402

07/24/2023, 2:02 PM
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

able-camera-57198

07/24/2023, 2:12 PM
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

millions-furniture-75402

07/24/2023, 2:15 PM
It's a recommended practice, fwiw
a

able-camera-57198

07/24/2023, 2:15 PM
Dig it! 🙂