Hey friends, I'm new to Pulumi and I've been trying to set up a "sandbox" of the following stack in AWS: VPC + RDS + ECR + EKS. I'm using Python. I've been trying to wrap my head around aws, awsx (and aws-native). I've been following the docs around the mentioned components in the different modules and I've been using the Chatbot extensively. Sadly I can't figure out how to do the following; I'd really appreciate some pointers.
1. Create VPC with public/private/database subnets in 2 AZs, but leave space for extension into third AZ later. That last part is what I can't figure out how to in a "feasible" way.
2. Assign the database subnet to an RDS subnet group. Currently the DB subnet is public (for legacy reasons...), but will be changed to isolated soon. I can't figure out how to deterministically select the correct subnets from the
vpc.public_subnet_ids
or
vpc.subnets
output. I looked into
apply
but couldn't find a solution.
I haven't looked any further because I'm already stuck at this point. The AI bot wasn't helpful at all, sadly. Is what I'm trying to do crazy? Seems like a relatively standard use case to me? 🤔