Repository navigation
fix(terraform): pin Aurora engine version to the running 13.23 - #387
geekbrother wants to merge 1 commit into
Conversation
Both clusters said engine_version = "13.18" while AWS had auto-upgraded them
to 13.23, so every plan queued a minor-version rollback on all four
resources:
~ engine_version = "13.23" -> "13.18"
That drift was harmless only because the plan job has been broken since March
2025 — the next working apply would have executed it. Pinned to what the
clusters actually run, and auto_minor_version_upgrade = false so the pin
holds; without it AWS bumps the minor again at the next maintenance window
and the drift returns. Minor upgrades become a deliberate bump of this value.
allow_major_version_upgrade stays true, unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
| # Pinned to what the cluster actually runs. AWS auto-upgraded it to 13.23 while this | ||
| # still said 13.18, so every plan queued an engine_version rollback. Minor upgrades | ||
| # are a deliberate bump here now, otherwise the drift comes straight back. | ||
| engine_version = "13.23" |
There was a problem hiding this comment.
Amazon will upgrade this if needed even if you disable auto_minor_version_upgrade as described in the docs, and this is the last version in the EndOf Standard support version in 13 family so later versions might be critical upgrades I assume.
Amazon Aurora will apply a minor version upgrade even if you haven't enabled the Auto minor version upgrade option
Ref to docs
Now that we are touching the version, it worth checking this:
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraPostgreSQLReleaseNotes/aurorapostgresql-release-calendar.html
On Feb 2026, `Aurora end of standard support date` for 13.23, time to evaluate the v14 and later ones.
We do have a single instance here, based on what I experieced aith aws Aurora, if case of incident, it takes 5-10 minutes for a new instance to get provisioned and running. are we ok to consider a second instance? like:
instances = {
1 = {}
2 = {}
}
The second instance automatically becomes a read-only replica
additional instances in an Aurora cluster automatically get established as replicas of the writer (ref)
so in case of any service outage in the writer, AWS will promptoe the reader as the new writer so we will have more resiliency against AZ outage or similar cases and we can consider it only on Prod.
Aurora automatically promotes one of the reader instances to take its place as the new writer.
ref
Both Aurora clusters declared
engine_version = "13.18"while AWS had auto-upgraded them to 13.23, so every plan queued a minor-version rollback across all four resources:(from the staging plan on #384, the first working plan since March 2025 — visible in run 34378756082)
The drift has been harmless only because
plan-stagingwas broken that whole time. The next working apply would have executed it against both staging databases.Change
engine_version→"13.23"on both clusters, matching what they actually run, so the plan is a no-op.auto_minor_version_upgrade = false, because that is what makes the pin hold. Left at the AWS default oftrue, AWS bumps the minor again at the next maintenance window and the drift comes straight back. Minor upgrades become a deliberate bump of this value.allow_major_version_upgradestaystrue, unchanged.terraform fmt -check -recursiveis clean (the module block realigned, which is why the diff is wider than the two lines).Important
Confirm prod's actual version before any prod apply.
ci_terraformonly plans staging, and this config is shared across both workspaces vialocal.environment. 13.23 is verified for staging from the plan above; if prod sits on a different minor, this pin becomes an upgrade there rather than a no-op. Worth a quick look at theecho-server-prodworkspace or the RDS console.Merge order
Land this before #386. #386 makes
auto_deploywork end to end, including the stagingterraform applythat had never been reached — so with this merged first, that first working apply has nothing to roll back.🤖 Generated with Claude Code