Open chandankashyap19 opened 2 years ago
Voting for Prioritization
Volunteering to Work on This Issue
This issue is still occurring and with AWS retiring 5.6 we need to be able to upgrade. I have noted that https://github.com/cloudposse/terraform-aws-rds-cluster/pull/151/commits/12428083b1ba059923ae08e904e2fbb6a65190ed This provider fixed the issue with the parameter group not being included as part of the major upgrade option with a join.
I have managed to upgrade it thanks to this issue and several hours of troubleshooting.
In short:
aws_db_parameter_group
and aws_rds_cluster_parameter_group
lifecycle {
create_before_destroy = true
}
aws_rds_cluster
engine = local.legacy_engine ? "aurora" : local.mysql_engine
engine_version = local.mysql_version
engine_mode = "provisioned"
allow_major_version_upgrade = local.allow_major_version_upgrade
db_instance_parameter_group_name = local.allow_major_version_upgrade ? aws_db_parameter_group.default.name : ""
engine
cannot be changed to aurora-mysql
this always triggers a replacement, but keeping it aurora
and changing engine_version
to a v2 version (5.7) works. Not an elegant solution but the only one I have managed to find. allow_major_version_upgrade
to true
db_instance_parameter_group_name
as well if allow_major_version_upgrade
is true
engine
from aws_rds_cluster_instance
aurora-mysql
At this point AWS is forcing updates to 5.7 since 5.6 went EOL last week.
Amazon Aurora MySQL 1 (with MySQL 5.6 compatibility) will reach end of life on February 28, 2023. We are providing you with a one week notice so you have sufficient time to upgrade your database cluster(s). You can find additional information needed to plan your upgrade including a detailed timeline with milestones in the 'Preparing for Amazon Aurora MySQL-Compatible Edition version 1 end of life' documentation.
Clusters that are running these deprecated engine versions after March 1, 2023 will be upgraded on your behalf within a maintenance window after March 1, 2023. The major version upgrade will start within your maintenance window and typically finish within that timeframe. Depending on the cluster and the database activity at the time, the upgrade process may extend beyond the maintenance window. For more information, please refer to the Amazon RDS maintenance window.
Terraform now wants to re-create clusters that have been updated out from under it - I'd propose some action to make this a better experience. Maybe make aurora
and aurora-mysql
equivalent for some period until we can remove aurora
as an option in v5.0.0 (or even remove the default entirely)?
I was able to update via console and match terraform to the updated cluster. No ideal but EOL approaching meant actioning it.
Terraform Core Version
1.1.4
AWS Provider Version
4.33.0
Affected Resource(s)
mysql aurora rds instance
Expected Behavior
in place upgrade supposed to be happen while performing upgrade from mysql5.6 to mysql5.7 aurora engine
Actual Behavior
Force replacement of rds cluster & rds instance while performing upgrade from mysql5.6 to mysql5.7 aurora engine
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
previously provisioned mysql aurora resource was having below setting.
To upgrade the cluster both parameters get replace with.
Also created additional parameter group thats support aurora-mysql5.7 family.
Terraform plan shows both cluster & instance force replacement and its due to the
engine
change.Debug Output
No response
Panic Output
No response
Important Factoids
engine=aurora
is giving me some different short of error like:InvalidParameterCombination: The current DB instance parameter group test-database-parameter is custom. You must explicitly specify a new DB instance parameter group, either default or custom, for the engine version upgrade.
References
No response
Would you like to implement a fix?
No response