hey y'all. Quick question on git / file structure vs stacks. If I have 2 different stacks to manage 2 different DNS domains, for example, do I need 2 separate folders with a Pulumi.yml & index file? Or can the 2 stacks be configured with e.g. Pulumi.domainA.yml & Pulumi.domainB.yml. If the latter, how does Pulumi know where the code is for the different stacks? Following the Pulumi guide, I'm assuming that 2 stacks for different environments are actually only configurable based on the config in the yml file, but the resources must be the same in both environments?
10/25/2021, 5:20 PM
yep! stacks are managed by
- it needs to be in the same directory as your
10/25/2021, 5:28 PM
So if there are two stacks, they will have exactly the same resources, but just configured with the yml file? And so if the two stacks need to have different resources, they have to be in separate folders with separate index files?
10/25/2021, 5:33 PM
you could use if statements to separate them, but yes, if they have different resources - they should be projects. If they have different configuration, like the cloud provider region you'ree deploying them to, you should have distinct stacks