Skip to content

fix: standardize on CODER_PG_CONNECTION_URL #7781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/server_createadminuser.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func (r *RootCmd) newCreateAdminUserCommand() *clibase.Cmd {

createAdminUserCommand.Options.Add(
clibase.Option{
Env: "CODER_POSTGRES_URL",
Env: "CODER_PG_CONNECTION_URL",
Flag: "postgres-url",
Description: "URL of a PostgreSQL database. If empty, the built-in PostgreSQL deployment will be used (Coder must not be already running in this case).",
Value: clibase.StringOf(&newUserDBURL),
Expand Down
2 changes: 1 addition & 1 deletion cli/server_createadminuser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func TestServerCreateAdminUser(t *testing.T) {
defer cancel()

inv, _ := clitest.New(t, "server", "create-admin-user")
inv.Environ.Set("CODER_POSTGRES_URL", connectionURL)
inv.Environ.Set("CODER_PG_CONNECTION_URL", connectionURL)
inv.Environ.Set("CODER_SSH_KEYGEN_ALGORITHM", "ed25519")
inv.Environ.Set("CODER_USERNAME", username)
inv.Environ.Set("CODER_EMAIL", email)
Expand Down
2 changes: 1 addition & 1 deletion cli/testdata/coder_server_create-admin-user_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ to every organization.
The password of the new user. If not specified, you will be prompted
via stdin.

--postgres-url string, $CODER_POSTGRES_URL
--postgres-url string, $CODER_PG_CONNECTION_URL
URL of a PostgreSQL database. If empty, the built-in PostgreSQL
deployment will be used (Coder must not be already running in this
case).
Expand Down
8 changes: 4 additions & 4 deletions docs/cli/server_create-admin-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ The password of the new user. If not specified, you will be prompted via stdin.

### --postgres-url

| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_POSTGRES_URL</code> |
| | |
| ----------- | ------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_PG_CONNECTION_URL</code> |

URL of a PostgreSQL database. If empty, the built-in PostgreSQL deployment will be used (Coder must not be already running in this case).

Expand Down