RDS: Automatic minor version upgrade
Before you begin
- Familiarize yourself with the AWS upgrade documentation for RDS
Affected versions
- Anyone using
args-rds-auroraversion 0.4.1 or earlier with no changes on default setup - Anyone with
engine_versionset to a minor version andauto_minor_version_upgradeset totrue - Note:
auto_minor_version_upgradedefaults totrue
Rationale
The current default in args-rds-aurora is a specific minor version to use when creating a database.
Because the default for auto_minor_version_upgrade is true AWS will upgrade your database from
ex. 13.6 (the default in args-rds-aurora) to 13.7 when the maintenance window allows for it.
When this happens it will generate a difference between IaC and the actual deployed version, and you will
be asked to downgrade the database the next time terraform apply is applied to the database stack.
This upgrade sets the engine_version to a major version by default and lets AWS handle automatic upgrade of minor versions.
Once applied there will be no difference between IaC and deployed version.
Related issues
Step 1: Upgrade to latest args-rds-aurora
Changes in all steps apply to the RDS configuration in the database stack.
Before:
source = "git@github.com:oslokommune/golden-path-iac//terraform/modules/args-rds-aurora?ref=args-rds-aurora-v0.4.0"
After:
source = "git@github.com:oslokommune/golden-path-iac//terraform/modules/args-rds-aurora?ref=args-rds-aurora-v0.5.0"
See Golden Path releases for the latest module version.
Step 2: Set engine version
Set the engine version to the default version:
Or, set it to a specific major version:
Or, set it to a specific minor version (auto_minor_version_upgrade should then be set to false):
Step 3: Allow auto-upgrade
Add the default:
Or disallow auto-upgrade to maintain full control over version:
The RDS setup in pirates-iac
implements the changes and can serve as a reference.
Step 4: Apply upgrade
Install the new version of args-rds-aurora and apply the changes:
Commit and push the changes to IaC.