Hey folks, I have a question regarding project str...
# general
m
Hey folks, I have a question regarding project structure. Imagine I want to have a repository where I want to define and manage different, unrelated resources, but all of the same resource type, say, AWS Glue Jobs. I am a bit conflicted about what structure to have, and how that would work in a CI/CD setting. I was thinking of using a structure like this, since the configs would be sufficiently generic to apply to each job. Would this even work? Or do I need to have a top level
__main__.py
necessarily?
Copy code
glue-jobs-pulumi
├── job-1
│   └── __main__.py
├── job-2
│   └── __main__.py
├── job-3
│   └── __main__.py
├── Pulumi.yml
└── Pulumi.dev.yml
l
Your options are multiple projects, multiple stacks, or a single stack. You should probably choose which option based on the deployment cycles. • Will you be deploying the various resources at the same time, and there's only one of each? (Single stack). • Will you be deploying the various resources at the same time, but you'll want more than one copy of each resource, perhaps one for APAC and one for US, or one for test and one for prod? (Single project, multiple stacks). • Do you want to deploy them individually, completely independently of all other resources? (Multiple projects)
Since the configs are similar, you probably want a single
__main__.py
. The only differences would be in your Pulumi.yaml and/or Pulumi.<stack>.yaml files.
m
yeah eventually I went for single project multiple stack startegy, with a top lvl
__main____.py
. thx for the advice!