Hi everyone! I just started with Pulumi and i was...
# aws
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.🙏
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.