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

cuddly-lizard-88530

04/26/2020, 7:36 AM
Any general tips for sharing high level definitions (e.g. VPC) across multiple repos / projects? E.g. one VPC may have several deployments in it, from different code bases. I think this can simply be done with internal NPM modules. But I am wondering if there is another, maybe a better, way?
w

white-balloon-205

04/26/2020, 4:11 PM
If you have a VPC that needs to be used in several apps, you can split into separate stacks, one for the VPC layer and others for each app. Then use StackReference from the apps to refer to the outputs of the VPC. See https://www.pulumi.com/docs/intro/concepts/organizing-stacks-projects/. If you have code (not resources) that you want to share across multiple apps (like you have a pattern for how those apps should configure k8s resources), then you could definitely use shared NPM modules for that.
c

cuddly-lizard-88530

05/01/2020, 4:23 AM
Cool, thanks!