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

InvalidParameterCombination: Cannot upgrade aurora-postgresql from 10.14 to 10.13 #228

Closed
SamuelM333 opened this issue Jun 23, 2021 · 3 comments

Comments

@SamuelM333
Copy link
Contributor

Description

A few days ago we started to see errors in our automated terraform apply runs. The AWS provider was trying to revert the minor engine version update made by RDS. We quickly fixed this by matching the engine version input of this module to the version that RDS upgraded to.

We noticed that this module already ignores engine version lifecycle changes, but only on the cluster instances: https://github.com/terraform-aws-modules/terraform-aws-rds-aurora/blob/master/main.tf#L135

Maybe this needs to be added to the cluster as well.

Versions

  • Terraform: v0.12.29
  • Provider(s):
+ provider.aws v2.70.0
+ provider.random v2.3.0
  • Module: v3.0.0

Reproduction

Steps to reproduce the behavior:

  1. Create an Aurora Cluster with db_engine_version = 10.13 and auto_minor_version_upgrade = true
  2. Allow RDS to perform the minor version upgrade during a maintenance window, upgrading the cluster engine version
  3. Run terraform apply

Expected behavior

Terraform applies successfully.

Actual behavior

Terraform errors out with the following message:

module.provisioned_aurora.module.aurora.aws_rds_cluster.this[0]: Modifying... [id=stg-ue1-api-actions-db]

Error: Failed to modify RDS Cluster (stg-ue1-api-actions-db): InvalidParameterCombination: Cannot upgrade aurora-postgresql from 10.14 to 10.13
	status code: 400, request id: b1b445e3-94ed-4b01-bb9d-b0137dbc7706

  on .terraform/modules/provisioned_aurora.aurora/main.tf line 35, in resource "aws_rds_cluster" "this":
  35: resource "aws_rds_cluster" "this" {

Exited with code exit status 1

Additional context

We are wrapping this module in our own module for convenience, that's why you see two module calls.

@SamuelM333
Copy link
Contributor Author

Adding the following code to aws_rds_cluster.this makes the issue go away:

resource "aws_rds_cluster" "this" {
  # ...

  lifecycle {    
    ignore_changes = [    
      engine_version    
    ]    
  }   
}

I will submit a PR with this change.

@bryantbiggs
Copy link
Member

I believe this is now patched in upstream and should resolve your issue hashicorp/terraform-provider-aws#17111

@github-actions
Copy link

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 Apr 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants