`fly pg create` not setting a `DATABASE_URL` secret

Open
#3,728 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
cli

Research direction

Start by locating the fly pg create command and compare its database setup flow with fly launch, which already sets DATABASE_URL. Verify how secrets are configured after the prompts, then confirm that creating a Postgres database results in the expected DATABASE_URL without manual intervention.

Written by the indexing model from the issue text.

Description

bug

There's a mismatch in behavior between fly launch and fly pg create when setting up a database.

If during fly launch I specify that I want postgres, a DATABASE_URL will be set automatically.
When I run fly pg create and go through the prompts, I have to set the DATABASE_URL manually.

For consistency it owuld be nice if the env var gets set in situation 2 as well.

Dominant language
Go
Stars
1.7k
Forks
311
Avg merge
12h 50m
Merged PRs (30d)
78

Contributor guide

Open the contributing guide

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 superfly/flyctl

All issues in superfly/flyctl

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.