able-tomato-34262
07/04/2018, 2:57 PMbig-piano-35669
07/04/2018, 4:32 PMlet vpc = new aws.ec2.VPC(...);
...
export let vpcID = vpc.id;
and then in a higher level stack, you'd accept the VPC as config
let config = new pulumi.Config(pulumi.getProject());
let vpcID = config.require("vpcID");
We've tried to make this easy to write tools to automate. For instance, once you've stood up that lower level stack, you can easily grab the resulting VPC ID, e.g. by running export MY_VPC_ID=$(pulumi stack output vpcID)
. And then for that higher level stack, you can just say pulumi config set vpcID $MY_VPC_ID
.
We do have a work item to make this flow more first class, because it is so common. See https://github.com/pulumi/pulumi/issues/109, and please feel free to weigh in if you have ideas. Things we'd like to do here include tracking inter-stack dependencies in a first class way (so you know if a change at the lower layer affects a downstream consumer), and potentially even orchestrating the cross-stack updates for you.able-tomato-34262
07/05/2018, 9:51 AMpulumi config
, that's pretty dangerous and may lead to errors if what's statically referenced don't exist anymore of have changed in the meantime. I answer the issue, let's talk about it there