Repository navigation
fix(terraform/aws): major-only RDS engine_version pin to stop downgrade failures - #1375
Conversation
…de failures RDS auto-minor-upgraded cudly-dev-426fc8af-postgres from 16.6 to 16.13. Terraform then tried to downgrade to 16.6, which RDS rejected with InvalidParameterCombination: Cannot find upgrade path from 16.13 to 16.6. Switching all six engine_version pins from "16.6" to "16" (major-only). The AWS provider v5 resolves a major-only value via engine_version_actual and suppresses diff on auto-minor upgrades, so no downgrade is ever attempted. auto_minor_version_upgrade is now explicit in the module to make the intent self-describing. Addresses the AWS deploy failure in #1372.
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 13 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Merged to main: RDS engine_version pins switched from exact-minor 16.6 to major-only 16 across all six locations (module default, env default, 3 github tfvars, example), with auto_minor_version_upgrade explicit and the convention documented. Provider v5.100.0 prefix-suppression verified, so the live 16.13 instance satisfies the pin and no downgrade is ever attempted. This fixes the AWS-half of #1372 (Deploy to AWS Lambda failing on ModifyDBInstance 16.13->16.6). Next AWS deploy on main will confirm; GCP half already confirmed fixed. |
Summary
InvalidParameterCombination: Cannot find upgrade path from 16.13 to 16.6.engine_versionpins were set to the exact minor"16.6". Any RDS auto-minor upgrade creates an irreconcilable drift -- Terraform sees a config mismatch and tries a downgrade that the API refuses."16.6"to"16"(major-only). The AWS provider v5 (5.100.0, confirmed in lockfile) stores the real minor version inengine_version_actualand suppresses diff when the configured value is a major-only prefix, so no downgrade is ever attempted and future auto-minor upgrades remain transparent.auto_minor_version_upgrade = trueis now set explicitly in the module resource with a comment, making the intent self-describing.Files changed
terraform/modules/database/aws/main.tf-- added explicitauto_minor_version_upgrade = truewith explanatory commentterraform/modules/database/aws/variables.tf-- pin changed to"16", description updatedterraform/environments/aws/variables.tf-- pin changed to"16", description updatedterraform/environments/aws/dev.tfvars.example-- pin changed to"16"terraform/environments/aws/github-dev.tfvars-- pin changed to"16"terraform/environments/aws/github-prod.tfvars-- pin changed to"16"terraform/environments/aws/github-staging.tfvars-- pin changed to"16"Gate results
terraform fmt -check -recursiveon both touched dirs: exit 0terraform init -backend=false && terraform validateinterraform/modules/database/aws: exit 0terraform init -backend=false && terraform validateinterraform/environments/aws: exit 0Test plan
terraform planin the dev environment shows no engine_version change for the existing 16.13 instanceAddresses the AWS deploy failure in #1372.