https://pulumi.com logo
#typescript
Title
# typescript
e

elegant-shampoo-65690

01/31/2020, 6:27 PM
Hey patrick, this might work:
const vpc: pulumi.Output<aws.ec2.Vpc> = apiStack.requireOutput("sharedServicesVpc").apply((value) => value as aws.ec2.Vpc);
a

acceptable-army-69872

02/03/2020, 4:34 PM
To close the loop on this, I was able to export the VPC from one stack to another. There was an issue with how I was referencing stacks, and it didn't give me a stack reference error, it gave me an error on using the exported object. In the end, exporting from one to another worked without having to do your suggestion. But thank you for the effort!
c

calm-parrot-72437

02/03/2020, 6:03 PM
hey @acceptable-army-69872, did you end up exporting the vpc id or were you able to export the vpc? wondering how to get the vpc out, or create the object from the vpc id in another stack.
a

acceptable-army-69872

02/03/2020, 6:45 PM
I exported the vpc, and then I had to pass the object from the remote stack around as an any.
i could go back to trying to looking the vpc back up, but I haven't been that ambitious
c

calm-parrot-72437

02/03/2020, 8:28 PM
cool, thanks for the info