Upgrade Aurora RDS PostgreSQL DB engine version from 11.21 to 15.5
Actual Behavior
During terraform apply, aurora db upgrade fails.
Relevant Error/Panic Output Snippet
Error: Provider produced inconsistent final plan
When expanding the plan for module.rds_cluster.aws_rds_cluster_instance.aurora-cluster-instances[0] to include new values learned so far during apply, provider│ "registry.terraform.io/hashicorp/aws" produced an invalid new value for .engine_version: was cty.StringVal("15.5"), but now cty.StringVal("11.21"). This is a bug in the provider, which should be reported in the provider's
own issue tracker.
################################################################################
# Aurora Postgresql RDS
################################################################################
module "rds_cluster" {
source = "git::https://gitlab.com/syngentagroup/Terraform-Modules/terraform-aws-rds-aurora.git/?ref=main"
#allocated_storage = 10
cluster_storage_type = ""
db_cluster_instance_class = ""
identifier_count = var.identifier_count
region = var.region
application_code = "gis"
environment = var.environment
engine = var.engine
engine_version = "15.5"
apply_immediately = true
instance_class = var.instance_class
storage_encrypted = false
availability_zones = ["eu-central-1a"]
vpc_security_group_ids = [module.rds_sg.security_group_id]
db_subnet_group_name = "**********"
cluster_parameter_group_name = null # if default pass null
parameter_group_name = null # if default pass null
snapshot_identifier = "arn:aws:rds:eu-central-1:***********:cluster-snapshot:*******"
deletion_protection = true
master_username = "******"
multi_az = false
number_of_read_replicas = var.number_of_read_replicas ## modify this attributes if you want to have more than 1 read replicas during the time of multi-az value is true
tags = local.tags
}
Steps to Reproduce
Run terraform apply with engine_version = 11.21
Run terraform apply with engine_version = 15.5
Debug Output
No response
Panic Output
No response
Important Factoids
I have tried work arounds mentioned in other similar issues like providing the engine_version explicitly rather than as a reference to the cluster resource and setting apply_immediately to true, but it did not help, same output.
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.
Terraform Core Version
0.13.2
AWS Provider Version
4.47,4.62,5.39.1
Affected Resource(s)
aws_rds_cluster
Expected Behavior
Upgrade Aurora RDS PostgreSQL DB engine version from 11.21 to 15.5
Actual Behavior
During terraform apply, aurora db upgrade fails.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
provider.tf
aurora-rds.tf
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
I have tried work arounds mentioned in other similar issues like providing the engine_version explicitly rather than as a reference to the cluster resource and setting apply_immediately to true, but it did not help, same output.
References
No response
Would you like to implement a fix?
None