fix: unwedge terraform-apply on RDS engine version drift - #261
Merged
Conversation
The aws module's `terraform-apply` has been failing on every merge:
InvalidParameterCombination: Cannot upgrade postgres from 17.9 to 17.6
main.tf pinned engine_version = "17.6", but RDS auto-applied a minor upgrade to
17.9 on the live instance. Terraform then tried to "downgrade" it, AWS rejected
it, and the whole aws-module apply aborted — which is why #256's Amplify changes
(SSR service role, NEXT_PUBLIC_API_BASE_URL) never actually applied.
Set engine_version to the live 17.9 and disable auto_minor_version_upgrade so
the version can't drift above the pin again; version bumps are now intentional.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nourshoreibah
marked this pull request as ready for review
June 30, 2026 23:39
Contributor
Terraform Plan 📖
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
terraform-applyfor theawsmodule has been failing on every merge to main (e.g. the #256 Amplify run):main.tfpinnedengine_version = "17.6", but RDS auto-applied a minor upgrade to 17.9 on the live instance. Terraform then plans a "downgrade" 17.9 → 17.6, AWS rejects it, and the entire aws-module apply aborts. That's why #256's Amplify changes (SSRiam_service_role_arn,NEXT_PUBLIC_API_BASE_URL) never landed — the apply died on RDS before reaching the Amplify update.What
engine_version = "17.9"— match the live instance, stop the downgrade attempt.auto_minor_version_upgrade = false— keep the version from drifting above the pin again, so apply stays green. Version bumps become an intentional edit-then-apply (tradeoff: minor patches are no longer automatic).Effect
Once merged,
terraform-applyshould succeed and finally apply the pending Amplify SSR config from #256. The Amplify app (dbcy90q4o31f7) still shows the default "Welcome" placeholder — after this + that apply, a push tomainshould trigger the first real SSR build.Verification
terraform fmtclean.terraform-planon this PR — confirm it shows only the RDS in-place update (engine_version17.6→17.9 metadata +auto_minor_version_upgradefalse) and no destroy.🤖 Generated with Claude Code