-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws-rds: Subnet selection doesn't work for cluster.addRotationMultiUser #19233
Comments
The subnet selection was always overriden by the subnet selection of the instance/cluster. Avoid these kinds of errors by explicitely defining rotation options and their defaults. Closes aws#19233
It looks like @jogold has already published a PR that will resolve this, so we can consider this fix in-progress (thank you for the quick fix!). 😸 |
…on (#19237) The subnet selection was always overriden by the subnet selection of the instance/cluster. Avoid these kinds of errors by explicitely defining rotation options and their defaults. Closes #19233 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…on (aws#19237) The subnet selection was always overriden by the subnet selection of the instance/cluster. Avoid these kinds of errors by explicitely defining rotation options and their defaults. Closes aws#19233 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
What is the problem?
There's a bug in VPC selection for addRotationMultiUser. Commented on original issue as well: #17265
Even if you pass in props for the subnet type to place the rotation lambda, it will always get placed in the same subnets as the cluster. See https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-rds/lib/cluster.ts line 611 for the addRotationMultiUser function. Notice how the '...options' line gets overridden by the cluster subnets.
The addRotationSingleUser function doesn't have this problem because the options are injected after the defaults. See the same file as above.
Not sure if there's another section of aws-rds that has an addRotationMultiUser function but worth checking the other rotation functions for the same bug.
I won't have time to work on a PR for a few months so someone else can feel free to pick this up. Just want to make sure the bug gets tracked.
Reproduction Steps
Create a vpc with private and isolated subnets and place an Aurora cluster in the isolated subnets. Then set up a multi user rotation:
What did you expect to happen?
Rotation lambda created in private subnet and able to talk to secrets manager through the internet.
What actually happened?
Rotation lambda created in isolated subnet (same subnet as cluster) and times out because it can't talk to the internet.
CDK CLI Version
2.12.0 (build c9786db)
Framework Version
No response
Node.js Version
v16.14.0
OS
macOS Monterey v12.1
Language
Typescript
Language Version
TypeScript Version 4.5.5
Other information
No response
The text was updated successfully, but these errors were encountered: