-
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
(rds): isFromLegacyInstanceProps migration flag not working #27177
Comments
Specifying the instance identifier will be the solution.
The only thing you need to be concerned with is CloudFormation's view of the world. CloudFormation will not know about any failover, so it will only apply any new changes with respect to CloudFormation's own previous configuration (emphatically, not the actual state of the world). In this case, since its previous template and its current template will be the same, it will not change anything. What will happen when you do intend to make a change via CloudFormation after a failover has happened ... I actually do not know. If it turns out that managing RDS via CloudFormation is not reliable, that's something you should take up with the RDS and/or CloudFormation teams. |
Thanks, can verify that this works. We have a PROD environment with this exact situation. The Should there be any further specification of this in the docs so others don't face the same issue as me? |
@rix0rrr We just hit this bug as well. Essentially the |
Describe the bug
When using the isFromLegacyInstanceProps to migrate my old RDS instance properties from instanceProps to the new method using
reader
andwriter
params, is still flagging my instances for recreation.This would cause my instances to be recreated, and I am curious if this would bring downtime and possibly even get rid of my automated backups.
Expected Behavior
I would except the output of the cdk diff step against my 'test' AWS account to be:
Current Behavior
The current output of cdk diff against my 'test' AWS account using the migration property is:
Reproduction Steps
Old CDK code used to deploy RDS currently on AWS test environment:
New CDK code used to do migration with no functional changes and the migration property:
Possible Solution
Using the method described in #25942 this problem can be solved. However in a non-ideal way.
You can directly specify an
instanceIdentifier
on both the reader and writer. However this creates a problem when deploying on multiple environments, the identifier of the reader and writer might differ on different environments due to a failover happening.Doing this however, will cause
cdk diff
to report what we want:Example:
Additional Information/Context
Also responded on #25900
CDK CLI Version
2.93.0 (build 724bd01)
Framework Version
No response
Node.js Version
v18.16.0
OS
MacOs
Language
Typescript
Language Version
5.2.2
Other information
Also replied on: #25900
The text was updated successfully, but these errors were encountered: