GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support for RDS JSON-style connection strings · Issue #38 · iceddev/pg-connection-string

Support for RDS JSON-style connection strings #38

New issue
Copy link
New issue
Copy link
Closed
Closed
Support for RDS JSON-style connection strings#38
Copy link

Description

@stephenh
stephenh
opened on Apr 26, 2020
Issue body actions

This is perhaps a little too-cute, but for applications/libraries using Amazon's RDS, RDS/CloudFormation can auto-secret/manage secrets in the AWS Secrets Manager that ends up being a JSON string that looks like:

{
  "host":"whateverrds.amazon.com",
  "port":5432,
  "username":"...",
  "password":"...",
  "dbname":"..."
}

(Without newlines, just formatted for the issue.)

It'd be nice if I could call parse(...) with the ^ string and have it recognize "oh right this is RDS json" and "do the right thing".

My use case is that I'm writing a library that reads connection information from an environment variable, and it'd be great if users could pass either the currently-supported parse connection strings, or, if they're running in RDS, this auto-managed secret value value.

Granted, I can manage this sort of "if/else" in my library, dunno, just seemed like it'd be neat (and lazy for me) if pg-connection-string did it.

I can work on a PR if this seems okay.

Activity

  1. hjr3 commented on Apr 29, 2020

    @hjr3
    hjr3
    on Apr 29, 2020
    Contributor
    More actions

    @stephenh interesting use case. I am not sure what "do the right thing" is though. Also, we just merge this repo into node-postgres in brianc/node-postgres#2184 . That probably means we should take that discussion over to that repository.

    Reacted by Stephen Haberman
  2. stephenh commented on Apr 29, 2020

    @stephenh
    stephenh
    on Apr 29, 2020
    Author
    More actions

    Great, saw that that happened. I'll re-post over there.

  3. stephenh
    closed this as completedon Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.