https://pulumi.com logo
#getting-started
Title
# getting-started
n

numerous-alarm-76016

03/20/2023, 10:26 AM
Hey all! I had a question about how to structure our cloud resources within pulumi projects. So things that are meant to be shared (only created once), for example, users and groups, shared fargate clusters, VPCs, and so on, should be in a project, called "infra" for example. Then we could have another pulumi project, called MyApp, that manages the resources specific to this app right? So this second project would use the resources created in the first one, correct? I would be very interested in the experience of others and how they structure their cloud resources and their git-ops repositories if someone is willing to share! Thanks in advance for your help! Cheers!
c

cuddly-computer-18851

03/20/2023, 10:46 AM
Yes, you would use Stack Outputs from the infra stack, and referenced from the application stack. This is a good choice for anything shared, eg VPCs ( including Subnets, etc ). We typically don't use Pulumi directly for this, but rather put these id's in SSM Parameters, and use that for lookups.
n

numerous-alarm-76016

03/20/2023, 1:26 PM
thanks a lot for your response, this is very helpful!
b

brave-motorcycle-67487

03/21/2023, 2:18 PM
I was hoping to start with a single repo/project for a while, but then was forced into this pattern (ECS definition includes container version; to update container version for a deploy, have to run Pulumi; therefore Pulumi has to be in the app's repo for CI)
n

numerous-alarm-76016

03/27/2023, 12:46 PM
Thanks a bunch!