-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
r/aws_elasticache_replication_group: Add a DiffSuppressFunc to the en… #15702
r/aws_elasticache_replication_group: Add a DiffSuppressFunc to the en… #15702
Conversation
…gine_version field
if len(versions) == 2 { | ||
major, minor := versions[0], versions[1] | ||
|
||
if minor == "x" && strings.HasPrefix(old, major) { |
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.
What if someone created Redis with "5.0.5"
and then later changed it to "5.x"
? I wouldn't expect someone to actually do that, but if someone did, rather than getting an expected apply-time error, your DiffSuppressFunc
might actually cause TF ignore that change if I follow your code correctly.
I think what you want to do is to compare the old major version and the new major version, check that it's >= 6, then return true
if the both major versions are equal and the new minor version == "x".
I.e. We want to suppress changes for6.0.5 -> 6.x
- we'd check that the major versions are equal, the major version is >=6, and new minor version == "x".
However, TF should NOT suppress changes for 5.0.5 -> 5.x
, the expectation is that this should lead to an apply-time error
@shuheiktgw Awesome work on the fix, please could you address #15702 (comment) |
@ktham @demolitionmode Sorry I haven't noticed your comments for so long! I've fixed it now! |
Awesome, thank you! @gdavison when you get a chance, can you review? |
@gdavison do you know a rough lead time for reviewing this please? |
What needs done to push this over the line? |
@gdavison hate to ping/bother you again |
This needs to be prioritized |
Thanks for the PR, @shuheiktgw. We've had some discussions on the team about the best way to handle the new way AWS is handling Redis versions for ElastiCache. We've decided that the best approach in this case is to have separate fields for the requested version ( In addition, this makes the behaviour consistent across Thanks again! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Closes #15625
Release note for CHANGELOG:
Output from acceptance testing:
Added a diff suppression function for the engine_version field. Thank you for your review!