Skip to content

fix(infra): support PostgreSQL TLS connections#3647

Open
tasoo-oos wants to merge 3 commits into
mainfrom
t2788-postgresql-connectivity
Open

fix(infra): support PostgreSQL TLS connections#3647
tasoo-oos wants to merge 3 commits into
mainfrom
t2788-postgresql-connectivity

Conversation

@tasoo-oos

@tasoo-oos tasoo-oos commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

AWS RDS가 TLS를 요구할 때 Iris와 Plag가 연결하지 못하는 문제를 해결합니다. 기존 문자열 치환은 schema=public&sslmode=requiresslmode=disable&sslmode=require로 바꿔 TLS를 비활성화할 수 있었습니다.

PostgreSQL URL을 파싱해 Prisma 전용 schema 옵션만 제거하고 명시된 sslmode와 다른 쿼리 옵션은 보존합니다. AWS Secrets Manager와 Terraform 출력에는 sslmode=require를 명시했으며, URL 변환 동작을 단위 테스트로 검증했습니다.

Additional context

Amazon RDS for PostgreSQL 릴리스 일정

PostgreSQL 14는 연말에 지원 종료될 예정이며, 이에 대응하기 위해서는 최신 버전 DB로 넘어가야 합니다.

Amazon RDS for PostgreSQL 18로 업그레이드하면 rds.force_ssl이 기본적으로 활성화되어 TLS 연결이 요구됩니다. 이에 따라 DB 클라이언트가 TLS 연결을 지원하도록 설정해야 합니다. 이 PR은 이를 위해서 작성되었습니다.

PostgreSQL 14, 16, 18에 대해 테스트되었습니다.


Before submitting the PR, please make sure you do the following

Closes TAS-2788

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a robust database URL parsing mechanism to handle SSL mode configurations for PostgreSQL connections across the 'iris' and 'plag' services, while also updating the Terraform infrastructure configuration to include 'sslmode=require'. The review feedback highlights two opportunities for refactoring: extracting the redundant 'parseDatabaseURL' function into a shared utility package to improve maintainability, and centralizing the database URL string in Terraform using a 'locals' variable to avoid duplication.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread apps/plag/src/loader/postgres.go
Comment thread infra/aws/storage/database.tf Outdated
@tasoo-oos tasoo-oos self-assigned this Jul 16, 2026
@tasoo-oos
tasoo-oos marked this pull request as ready for review July 16, 2026 18:58
@tasoo-oos
tasoo-oos force-pushed the t2788-postgresql-connectivity branch from 7aa9fda to e8a522b Compare July 16, 2026 18:58
@tasoo-oos tasoo-oos changed the title fix: support PostgreSQL TLS connections fix(infra): support PostgreSQL TLS connections Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant