This isn't really a Pulumi issue as far as I can tell. This is more about how VPCs work: You can't delete (or make a change that requires re-creating) a subnet when it has stuff in it. The "dependency" text here is originating from the AWS API, not Pulumi.
I would recommend working within a single stack for now since you're new to Pulumi.
stocky-restaurant-98004
09/01/2023, 1:37 PM
If your network architecture isn't stable, you're gonna have to tear down any resources in the VPC if the VPC structure changes. Unless you're doing something more advanced, you can't go wrong with public and private subnets split across 3 AZs. If you use the AWSX VPC, you get this by default:
https://www.pulumi.com/registry/packages/awsx/api-docs/ec2/vpc/
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.