terraform-provider-aws
terraform-provider-aws copied to clipboard
Reexamine the default enabling of RDS auto_minor_version_upgrade setting due to high likelihood of Terraform state clashes
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- 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
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
Currently in the Terraform module auto_minor_version_upgrade
is set to true for RDS instances. However this is very likely going to cause problems and is a Terraform "sniff" as the state of the database is being changed outside of Terraform and will cause clashes whenever a user has specified a specific version of the database:
│ Error: updating RDS DB Instance (test-rds): InvalidParameterCombination: Cannot upgrade postgres from 12.11 to 12.10
│ status code: 400
│
│ with module.aws_db_instance.gitlab[0],
│ on ../terraform/modules/rds/rds.tf line 47, in resource "aws_db_instance" "rds":
│ 47: resource "aws_db_instance" "rds" {
With Terraform it's strongly not recommended to have the state change outside of it. In this case should this behaviour not be disabled by default?
New or Affected Resource(s)
-
aws_db_instance
Potential Terraform Configuration
resource "aws_db_instance" "rds" {
engine = "postgres"
engine_version = "12.10"
# allow_major_version_upgrade = true
}
References
- #1198 was a similar issue but focused more on ignore_changes which feels more like a plaster fix