-
-
Notifications
You must be signed in to change notification settings - Fork 574
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
feat: Add global_upgradable variable to support major engine version upgrades to global clusters. #426
Conversation
This PR has been automatically marked as stale because it has been open 30 days |
…upgrades to global clusters. Fix terraform-aws-modules#425. A much more thorough explanation is provided in examples/global-cluster/README.md. Update documentation via pre-commit for global_upgradable.
My patch has been updated to resolve conflicts. That doesn't seem to remove the stale label, so I comment to notify. |
We are currently facing issues with this in a client environment. Hoping this gets merged soon. 🤞 |
This PR has been automatically marked as stale because it has been open 30 days |
Still awaiting review. |
This PR has been automatically marked as stale because it has been open 30 days |
I'll be happy to resolve conflicts once any action happens here. Until then I'll just continue to keep this alive and maintain the fork. |
This PR has been automatically marked as stale because it has been open 30 days |
Still waiting. |
Why don't you rely on You still gonna have issue with |
@alisson276 I'm not sure how to be more clear that the description and in the updates in this README file. This does still rely on Oh maybe you're suggesting keying off of that already existing variable to trigger the alternate resource, not just that using that variable alone would solve the issue. 💡 That is an interesting idea. I'll give it some thought. |
Exactly, I'm suggesting using this variable to be your The same should be done for the aws_rds_cluster_instance if auto_minor_version_upgrade is set to true. You'd end up with 4 resources, but only two created. The problem with this approach I'm proposing is it would create a breaking change for the one current using it with this set to true. I don't think this is a problem, because I can use a |
This PR has been automatically marked as stale because it has been open 30 days |
This PR was automatically closed because of stale in 10 days |
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. |
Fix #425. A much more thorough explanation is provided in examples/global-cluster/README.md.
I recognize this adds complexity just to ignore
engine_version
, but ... I don't know another way around this issue.Upgrading major version of global clusters
Upgrading the major version of global clusters is possible, but due to a limitation in terraform, it requires some special consideration. As documented in the provider:
In order to accomplish this in a module that is otherwise used for non-global clusters, we must duplicate the cluster resource. The limitation that requires this is, terraform lifecycle meta-arguments can contain only literal values:
That means, that to ignore the
engine_version
in some cases but not in others, we need another resource. So, if you intend to upgrade your global cluster in the future, you must set the new variableglobal_upgradable
totrue
.Migrating the resource
If you already have a global cluster created with this module, and would like to make use of this feature, you'll need to move the cluster resource. That can be done with the cli:
Or via a new moved block:
After that, changing the major version should work without issue.
Breaking Changes
This is not a breaking change, but if people start using this variable without exercising caution they could wipe a database, but that is the nature of it all I suppose. It could possibly be considered a bug fix on the other hand.
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)pre-commit run -a
on my pull request