Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

nais postgres proxy bør ha maskinlesbar output

Open
#826 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
57/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go, postgresql
Domain
cli, databases

Research direction

Start by locating the nais postgres proxy command and reading how it currently assembles its connection details and prints the human-readable output. The issue suggests an optional machine-readable mode, such as environment variables, and asks to use PostgreSQL’s standard variables where possible. Done means the command can emit the connection details in a form a program can consume; the issue does not name a file or test.

Written by the indexing model from the issue text.

Description

nais postgres proxy ingtest-1 --reason "all your db are belong to kimtore" --ttl 1h --access-level admin

Gir følgende output:

Postgres access ready.
Postgres relay listening at 127.0.0.1:55541; user: [email protected]; TLS server name: pg-ingtest-1-main-9ff1f921-rw.dataplattform.svc.cluster.local; CA: /var/folders/m8/8z4wwnrd4tbbm9n6kz8992mc0000gn/T/nais-postgres-ca-263561047.crt
Use host= hostaddr= sslmode=verify-full sslrootcert=. For automatic setup use 'nais postgres psql'.
Database password is only available here with --print-password (sensitive output).

Jeg lager et program som skal koble seg til denne databasen, det hadde derfor vært svært nyttig med maskinlesbar output fra denne kommandoen. Gjerne som environment-variabler til standard output. Kanskje switche mellom denne typen output og menneskelig output med et flagg?

Eksempel, bruk gjerne Postgres sine egne miljøvariabler der det er mulig:

PGPASSWORD=oensutheoUNTH5R6Ce
[email protected]
PG_CA_PATH=...
PG_KEY_PATH=...
PG_CERT_PATH=...
# og så videre
Dominant language
Go
Stars
2
Forks
5
Avg merge
3h 49m
Merged PRs (30d)
34

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nais/cli

All issues in nais/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.