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

adamant-translator-31969

01/22/2021, 8:29 PM
Hi guys! I have a question... I want to migrate my existing vpc created with aws.ec2.vpc to awsx.ec2.vpc ... somebody could help me?
b

broad-dog-22463

01/22/2021, 8:32 PM
Hi @adamant-translator-31969, maybe you can try something like:
Copy code
awsx.ec2.Vpc.fromExistingIds(`${name}-vpc`, { vpcId: myexistingVpcId });
a

adamant-translator-31969

01/25/2021, 5:30 PM
Thanks @broad-dog-22463 I will try it!
@broad-dog-22463 I have a question.... will this method create a new vpc? because I already have "vpc-id" created
b

broad-dog-22463

01/26/2021, 12:35 PM
Shoot
I believe this will effectively run a get to build a vpc object
But the preview will tell you that
a

adamant-translator-31969

01/26/2021, 12:40 PM
ok! Thanks for your help @broad-dog-22463! 😄
👍 1
@broad-dog-22463 metod
awsx.ec2.vpc.fromExistingId
doesn't return my routes associated to my subnets . 😕