-
-
Notifications
You must be signed in to change notification settings - Fork 573
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
fix: Ignore instance engine version updates #134
fix: Ignore instance engine version updates #134
Conversation
Hi Alen, Unfortunately, this is not the fix we can accept in this module because it breaks the functionality for people who want to do upgrades with Terraform. I recommend you change the value of an argument of this module and run |
But, this makes it possible to upgrade with Terraform. Currently, it is not possible, because the module will recreate the instances. Recreating RDS instances means losing the data and huge downtime even if you want to restore from a snapshot. With this PR, the module will update the cluster resource, and the cluster resource updates the instances. After the run is finished, both cluster and instance versions are aligned. |
Have you tried the solution I've just described? |
I did not. That is not a solution, it is a workaround. Let me explain the issue in more detail. For example, I want to update to the new engine version. I go and edit What I get instead is:
Why does the instance need to be replaced when that is not required for the engine upgrade? With this PR, I would only see As I workaround I targeted only cluster |
Came here to see this issue and agree fully with @komljen about both the solution and the workaround not being useful. @antonbabenko maybe you could lay out in more detail how you would expect a solution to this problem to be implemented if you don't want to accept this PR, that would help to see how we might arrive at a solution that suits both needs. |
I was asked to give some input on this issue. This module is designed to support the majority of use-cases out-of-the-box without a need to manage a separate fork. It does this part as best as it is possible with the current version of Terraform. Introducing To make this work for both types of users we can't have this PR merged, but we need to use the workaround specified by @komljen in the comment above. There is no better workaround which I am aware of, which can be less hacky because Terraform 0.13 still does not allow us to use variables inside of the |
The above claim is simply not true. @antonbabenko even Terraform docs for
Reference https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/rds_cluster_instance Which makes perfect sense. If you put instance under the cluster, like this module does, from AWS perspective versions are one thing. You simply cannot update one version without another. However, to update the instance version, you just need to update the cluster version. That is how AWS API works and has not anything to do with Terraform features. |
Nice. Now we are talking, I didn't see this in the docs before. 👍 But I still don't understand what if users want to be able to control Let's merge this PR and make a note in README about this so that everyone is aware of it. |
They still do, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Updating engine version forces replacement of instances, and they shouldn't be replaced, because cluster will update them if the engine version is changed.
Motivation and Context
Fixes #118
Breaking Changes
none
How Has This Been Tested?
I tested this on multiple aurora clusters to upgrade MySQL engine version 2.07.1 -> 2.07.2.