Skip to content
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

[Bug]: aws_rds_cluster major version upgrade throws InvalidParameterCombination in second apply attempt #28219

Closed
riji-ramachandran opened this issue Dec 6, 2022 · 3 comments · Fixed by #30247
Labels
bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service.
Milestone

Comments

@riji-ramachandran
Copy link

riji-ramachandran commented Dec 6, 2022

Terraform Core Version

1.0.8, 0.14.11

AWS Provider Version

4.30.0

Affected Resource(s)

aws_rds_cluster
db_instance_parameter_group_name

Expected Behavior

Trying to upgrade RDS Aurora cluster with one instance from Postgres engine version 13.7 to 14.3
apply_immediately set to true at cluster level. Also db_instance_parameter_group_name is passed to the cluster.
Expect cluster and instance to be upgraded.

Actual Behavior

On first plan and apply there are no parameter group related error. However if the first run fails for any given reason on second attempt upgrade fails with error:
Error: updating RDS Cluster: InvalidParameterCombination: The current DB instance parameter group is custom. You must explicitly specify a new DB instance parameter group, either default or custom, for the engine version upgrade
If the db_instance_parameter_group_name is changed then apply works again.

Relevant Error/Panic Output Snippet

Error: updating RDS Cluster: InvalidParameterCombination: The current DB instance parameter group is custom. You must explicitly specify a new DB instance parameter group, either default or custom, for the engine version upgrade

Terraform Configuration Files

resource "aws_rds_cluster" "aurora_postgres" {
  depends_on = [
    aws_rds_cluster_parameter_group.aurora_postgres_db,
    aws_db_parameter_group.aurora_instance_parameter_group
  ]
  cluster_identifier              = "test-aurora-upgrade-cluster"
  engine                          = "aurora-postgresql"
  engine_version                  = 14.3
  port                            = 6160
  database_name                   = "test"
  allow_major_version_upgrade     = true
  db_cluster_parameter_group_name = aws_rds_cluster_parameter_group.aurora_postgres_db.id
  db_instance_parameter_group_name =aws_db_parameter_group.aurora_instance_parameter_group.id
  apply_immediately          = true
}

Steps to Reproduce

  • Create an rds aurora postgres cluster with one writer instance - engine version 13.7 and custom cluster and instance parameter groups. Set apply_immediately to true
  • Once cluster and instance is created change the engine version to 14.3 also change the parameter groups for cluster and instance to family 14
  • Make a deliberate mistake so plan completes but apply fails (i had set apply_immediately to false). Plan succeeds but apply will fail
  • Revert apply_immediately to true and run apply again. Will get the below error:
    Error: updating RDS Cluster: InvalidParameterCombination: The current DB instance parameter group is custom. You must explicitly specify a new DB instance parameter group, either default or custom, for the engine version upgrade

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No

@riji-ramachandran riji-ramachandran added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Dec 6, 2022
@github-actions
Copy link

github-actions bot commented Dec 6, 2022

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/rds Issues and PRs that pertain to the rds service. label Dec 6, 2022
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Dec 6, 2022
@github-actions github-actions bot added this to the v4.62.0 milestone Apr 3, 2023
@github-actions
Copy link

github-actions bot commented Apr 7, 2023

This functionality has been released in v4.62.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented May 8, 2023

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants