https://pulumi.com logo
Title
m

magnificent-smartphone-40853

05/21/2022, 1:32 AM
Is there a way to convert a VPC created with `awsx.ec2.Vpc`to a VPC created with the
aws.ec2.Vpc
without having to destroy the existing vpc & subnets? I started out with awsx.ec2.Vpc, and realize that we do not have enough control of the subnet / route table associations.
l

little-cartoon-10569

05/22/2022, 9:16 PM
The awsx.ec2.Vpc object wraps the regular Vpc object. You can safely create new code for all the existing resources, use the
import
opt to sort out the stack, then remove the awsx Vpc from code and state. Fairly laborious if you have a lot of subnets..
Note that you will need to manually remove the awsx Vpc from state via the CLI, else Pulumi will try to delete it.