This message was deleted.
s
This message was deleted.
b
you can either reference the vpc outputs you need as stack references: https://www.pulumi.com/docs/intro/concepts/organizing-stacks-projects/#inter-stack-dependencies or look up the VPC defined in another stack https://www.pulumi.com/docs/reference/pkg/aws/ec2/vpc/#look-up
you can't have a resource owned by many stacks though, it needs to be defined once
you could have a configurable flag, something like
Copy code
if config.create_vpc {
 // create the vpc
} else {
 // get the vpc using the get method
}
and then configure the stacks to create the vpc, if that makes sense