https://pulumi.com logo
#aws
Title
# aws
w

witty-battery-28013

03/04/2024, 12:25 PM
Hi all, using awsx vpc support, is it possible to create public and private subnets so that the first three subnets are all private and have consecutive subnet cidrs? When I run a test with pulumi it alternates the next cidr block with public / private / public / private.. What I want is to have private / private / public / public, for example. The only real reason is I will need to import some existing vpc's and really can't recreate them 🙂
g

great-sunset-355

03/04/2024, 2:25 PM
In this case, I'd avoid
awsx
... basically I avoid
awsx
entirely because it is an opinionated collection of Component Resources. Majority of my use cases is outside of the scope. You can create your own structure of component resources and then import existing VPCs. alternatively, you can try this
awsx.ec2.Vpc.fromExistingIds
w

witty-battery-28013

03/04/2024, 2:39 PM
thanks, yes I started actually as you suggested but had awsx worked out of the box for me it would have been nice as it is a lot less up front work. I will go back to that strategy (there is other things that I think awsx wont like by default)