I'm looking at building an Aurora Postgres Serverl...
# aws
s
I'm looking at building an Aurora Postgres Serverless V2 cluster in a non-default VPC, but I do not see an apparent way to specify which VPC the cluster should be created in—no option in ClusterArgs or ClusterInstanceArgs—is it just missing? Seems like it's choosing the default VPC - but I really don't want this.
Copy code
error creating RDS cluster: InvalidParameterCombination: The DB instance and EC2 security group are in different VPCs. The DB instance is in vpc-088d910645c61f340 (Default VPC) and the EC2 security group is in vpc-064aba8b2279cfa50 (my custom Data VPC where I want the cluster to reside)
how do I tell pulumi to put this cluster in my dataVPC and not the default VPC?
When creating a DB Cluster I see VPC selection in the console - looking for the equivalent for ClusterArgs
v
You have to create a subnet groups
s
thanks for the reply @victorious-dusk-75271 . yeah saw that an imported db cluster had a generated subnet group, but the name was a bit unfortunate with “default” prefix in the naming. are there any docs that have this config explained that you know of?
Create a DB subnet group A DB subnet group is a collection of subnets that you create in a VPC and that you then designate for your DB instances. A DB subnet group makes it possible for you to specify a particular VPC when creating DB instances.
the default behavior of Cluster creation in the console seems to create a subnet group with both private and public subnets - is there a reason to include the public subnets for the RDS cluster?
v
no, you just need to provide the private subnets
s
oh nice, was using the vpc template from that example already