Is there a way to convert a VPC created with `awsx...
# general
m
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
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.