Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PostgreSQL 14 in DB parameter groups #707

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Conversation

agarciamontoro
Copy link
Member

Summary

I was adding some DB parameters to log slow queries through the TerraformDBSettings.DBParameters setting when I encountered this error:

info  [2024-03-13 16:08:04.732 Z] ╷                              caller="terraform/engine.go:97"
info  [2024-03-13 16:08:04.732 Z] │ Error: updating RDS Cluster Instance (agm100m-db-0): InvalidParameterCombination: The parameter group agm100m-db-pg with DBParameterGroupFamily aurora-postgresql12 can't be used for this instance. Use a parameter group with DBParameterGroupFamily aurora-postgresql14. caller="terraform/engine.go:97"
info  [2024-03-13 16:08:04.732 Z] │     status code: 400, request id: 86819d3b-384b-4085-8212-09eafaa3e753 caller="terraform/engine.go:97"
info  [2024-03-13 16:08:04.732 Z] │                              caller="terraform/engine.go:97"
info  [2024-03-13 16:08:04.732 Z] │   with aws_rds_cluster_instance.cluster_instances[0], caller="terraform/engine.go:97"
info  [2024-03-13 16:08:04.732 Z] │   on cluster.tf line 313, in resource "aws_rds_cluster_instance" "cluster_instances": caller="terraform/engine.go:97"
info  [2024-03-13 16:08:04.732 Z] │  313: resource "aws_rds_cluster_instance" "cluster_instances" { caller="terraform/engine.go:97"
info  [2024-03-13 16:08:04.732 Z] │                              caller="terraform/engine.go:97"
info  [2024-03-13 16:08:04.732 Z] ╵                              caller="terraform/engine.go:97"
info  [2024-03-13 16:08:04.740 Z] ╷                              caller="terraform/engine.go:97"

It turns out we forgot to update this line back when we updated to Postgres 14, and I have never used the param group setting since, so the bug kept hidden.

Ticket Link

--

@agarciamontoro agarciamontoro added the 2: Dev Review Requires review by a core committer label Mar 13, 2024
@agarciamontoro
Copy link
Member Author

agarciamontoro commented Mar 13, 2024

We should probably write some E2E tests that do a dummy deployment trying to use all config values we have.

@agarciamontoro agarciamontoro added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core committer labels Mar 14, 2024
@agarciamontoro agarciamontoro merged commit 93bb692 into master Mar 14, 2024
1 check passed
@agarciamontoro agarciamontoro deleted the fix.db.params branch March 14, 2024 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants