Skip to content

Commit 14d42d9

Browse files
Enable rds_iam authentication
1 parent 81467ca commit 14d42d9

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ gem "standard", ">= 1.35.1"
8383
gem "sentry-ruby"
8484
gem "sentry-rails"
8585

86+
gem "pg-aws_rds_iam"
87+
8688
gem "openssl", ">= 3.3.1"
8789

8890
gem "intercom-rails", "~> 1.0"

Gemfile.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ GEM
107107
aws-sdk-kms (1.118.0)
108108
aws-sdk-core (~> 3, >= 3.239.1)
109109
aws-sigv4 (~> 1.5)
110+
aws-sdk-rds (1.302.0)
111+
aws-sdk-core (~> 3, >= 3.239.1)
112+
aws-sigv4 (~> 1.5)
110113
aws-sdk-s3 (1.209.0)
111114
aws-sdk-core (~> 3, >= 3.234.0)
112115
aws-sdk-kms (~> 1)
@@ -317,6 +320,9 @@ GEM
317320
pg (1.6.2-x86_64-darwin)
318321
pg (1.6.2-x86_64-linux)
319322
pg (1.6.2-x86_64-linux-musl)
323+
pg-aws_rds_iam (0.7.0)
324+
aws-sdk-rds (~> 1.0)
325+
pg (~> 1.1)
320326
phony (2.22.5)
321327
pp (0.6.3)
322328
prettyprint
@@ -599,6 +605,7 @@ DEPENDENCIES
599605
mailgun-ruby
600606
openssl (>= 3.3.1)
601607
pg
608+
pg-aws_rds_iam
602609
phony
603610
propshaft
604611
pry-byebug

config/database.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ deploy_default: &deploy_default
2424
database: prior_year_access
2525
host: <%= ENV["DATABASE_HOST"] if ENV["DATABASE_USER"] %>
2626
username: <%= ENV["DATABASE_USER"] if ENV["DATABASE_USER"] %>
27-
password: <%= ENV["DATABASE_PASSWORD"] if ENV["DATABASE_PASSWORD"] %>
2827
url: <%= ENV["DATABASE_URL"] %>
28+
aws_rds_iam_auth_token_generator: default
2929

3030
# Store production database in the storage/ directory, which by default
3131
# is mounted as a persistent Docker volume in config/deploy.yml.
@@ -43,4 +43,4 @@ production:
4343
migrations_paths: db/cable_migrate
4444

4545
staging:
46-
<<: *deploy_default
46+
<<: *deploy_default

0 commit comments

Comments
 (0)