https://pulumi.com logo
#aws
Title
# aws
b

boundless-tomato-68419

09/27/2022, 6:08 PM
Hi everyone! I just started with Pulumi and i was wondering if someone tried to have 2 different Pulumi stacks(projects) with one file for shared services/resources? I see that it is possible by exporting some values from the stacks but can i actually achieve this without it? The end goal would be to have some of the resources included in a class within a standalone configuration file and then used in the index.js files just as an instance. All suggestions would be appreciated.🙏
l

little-cartoon-10569

09/27/2022, 7:52 PM
You can use automation-api for this: it can wrap multiple projects in a single file.
When designing this, remember to consider deployment cycles. If the shared resources are likely to be updated with a different frequency (which is almost always the case), then you will want different projects.
automation-api can wrap external projects, so it is fine to have a project for shared resources, one for app-specific resources, and an automation-api app that wraps them both.
This is particularly handy for handling things like the initial deployment of one stack of shared resources, plus multiple stacks off app-specific resources (all using the same shared resources). And once deployed, you can use the specific projects and stacks to roll out individual updates on independent cycles.
2 Views