salmon-beard-79336
07/30/2019, 3:18 PMbitter-oil-46081
07/30/2019, 5:12 PMpulumi up
command to update the entire thing) or are you looking to try to break your existing project into a bunch of smaller stacks (one for the networking layer, one for the db, etc)?salmon-beard-79336
07/30/2019, 5:22 PMbitter-oil-46081
07/30/2019, 8:40 PMnetwork
module which creates a VPC, two subnets, an internet gateway and route table and route table assoications, but only exports the vpc, array of subnets and internet gateway. Then in other modules we do things like import { vpc } from "../network";
This lets you structure your code in a reasonable way, and control what you expose externally.
The next step you could consider taking would be to take these modules and consider wrapping all their resources in a component (this would mean that the display you see in the CLI would group logically related resources together, under the parent component) and then export and instance of component itself from the module.
We find most folks will just start with one, to get good code organization. As you move to (2) you will need to make use of the aliases
feature to ensure when you start taking existing infrastructure and setting its parent, you don't cause replaces to happen.salmon-beard-79336
08/04/2019, 10:58 PM