narrow-area-20379
10/27/2020, 11:36 PMrhythmic-finland-36256
10/28/2020, 11:58 AMStackReferences
to import values/ids created in some base infra stack e.g. See Organizing projects and stacks for more details.
If it comes to structuring your project files, it’s not just about putting some helper functions into different .ts
files. Pulumi comes with the concept of resources, and especially `ComponentResource`s that help building reusable components. Those classes create some own scope by parenting the regular resources and providing them a set of `Provider`s to be used. That way you can create a set of resources (inside one ComponentResource
that use a specific set of providers without specifying the provider for each individual resource. You can have a look at the docs on ComponentResources for more details. The pulumi/examples repo has some samples for using components, for example this webserver component or some more using the search…
I personally really like modularizing using `ComponentResource`s on a project level and I see some benefits of `StackReference`s if there are really global resources like DNS or VPCs, but I definitely would not create too many stacks upfront because this will create some new issues of outputs management and execution orders.brief-printer-34348
10/28/2020, 4:20 PMnarrow-area-20379
11/02/2020, 5:48 AMbrief-printer-34348
11/03/2020, 5:25 AMrhythmic-finland-36256
11/03/2020, 3:37 PMnarrow-area-20379
11/03/2020, 6:09 PMrhythmic-finland-36256
11/04/2020, 7:17 AM