Describe the Issue:
-
According to the DO Dashboard, connection pools can have the user field (also known as User privileges override (Optional)) set to an empty string (which appears as N/A in the table shown on the Connection Pools tab for a Postgres database). The empty string corresponds to "Use inbound user" in the DO Dashboard.
-
The DO API Reference to "Add a New Connection Pool" shows:
name, mode, size and db are required, but
user is not required.
- When using
doctl databases pool create <database-cluster-id> <pool-name> --size 25 --db <a-database-name-that-exists-inside-database-cluster-id-provided> --mode transaction, I see an error message appear:
Error: (pool.create.user) command is missing required arguments
See "Additional Details" below for a possible fix.
Environment:
Additional Details:
Since the --user arg is not marked as a requiredOpt() in
|
AddStringFlag(cmdDatabasePoolCreate, doctl.ArgDatabasePoolUserName, "", "", |
|
"The username for the database user") |
I believe the problem lies with
|
user, err := c.Doit.GetString(c.NS, doctl.ArgDatabasePoolUserName) |
|
if err != nil { |
|
return nil, err |
|
} |
|
req.User = user |
which probably needs to be modified so it doesn't throw an error if no
--user arg is provided.
Describe the Issue:
According to the DO Dashboard, connection pools can have the user field (also known as
User privileges override (Optional)) set to an empty string (which appears asN/Ain the table shown on the Connection Pools tab for a Postgres database). The empty string corresponds to "Use inbound user" in the DO Dashboard.The DO API Reference to "Add a New Connection Pool" shows:
name,mode,sizeanddbare required, butuseris not required.doctl databases pool create <database-cluster-id> <pool-name> --size 25 --db <a-database-name-that-exists-inside-database-cluster-id-provided> --mode transaction, I see an error message appear:See "Additional Details" below for a possible fix.
Environment:
1.142.0-release(Git commit hash: 4979b33d)Additional Details:
Since the
--userarg is not marked as arequiredOpt()indoctl/commands/databases.go
Lines 1239 to 1240 in c74c583
I believe the problem lies with
doctl/commands/databases.go
Lines 1344 to 1348 in c74c583
which probably needs to be modified so it doesn't throw an error if no
--userarg is provided.