hey y'all. Quick question on git / file structure ...
# getting-started
b
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?
b
yep! stacks are managed by
Pulumi.<stackname>.yaml
- it needs to be in the same directory as your
Pulumi.yaml
b
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?
b
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
b
ok awesome. thanks so much @billowy-army-68599!!