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

fix(database): exclude limitless suffix from Aurora PostgreSQL versions #84

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion stacks/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,13 @@ func getLatestRdsVersion(sess *session.Session, engine *string) (string, error)
if err != nil {
return "", err
}
return *resp.DBEngineVersions[len(resp.DBEngineVersions)-1].EngineVersion, nil
// Filter for the latest version without "limitless"
for i := len(resp.DBEngineVersions) - 1; i >= 0; i-- {
if version := *resp.DBEngineVersions[i].EngineVersion; !strings.Contains(version, "limitless") {
return version, nil
}
}
return "", fmt.Errorf("no compatible version found for engine %s", *engine)
}

func listRDSInstanceClasses(sess *session.Session, engine, version *string) ([]string, error) {
Expand Down
Loading