If I want to keep multiple stacks for one project ...
# general
If I want to keep multiple stacks for one project in a monorepo, can I do sub-dirs for each stack, or is that an anti-pattern?
Subdirs for each project is fine. I don't know how it would work, for each stack...
In general, stacks are identical apart from config... the only different is the Pulumi.<stack>.yaml file...
Maybe I'm misunderstanding the purpose of stacks
I've created a bunch of Azure infra, and so far I've been managing everything within that project/stack. I'm using multiple k8s clusters now and Pulumi's handling of CRDs is completely screwing things up trying to install identical things (like our API gateway helm chart) into multiple clusters, so I was going to start breaking the clusters out into their own stacks within this project
should that really be separate projects?
stacks are instances of a project. As an example, my organization has stacks in the pattern
As tenwit said, the only thing different for these instances is the configuration. It is possible to add conditional infrastructure into your plan based on the
value, but this could be an anti-pattern.
So re-reading your last message, yes, it sounds like you want multiple projects. You can centralize some of the resources in a
project and export your outputs for the other projects to use via StackReferences.
ok cool, thank you for the advice!
You probably want organize them into micro-stacks