-
Notifications
You must be signed in to change notification settings - Fork 440
Labels
Description
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/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.
name
,mode
,size
anddb
are required, butuser
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:
- doctl version:
1.142.0-release
(Git commit hash: 4979b33d
) - OS: Ubuntu 20.04.4 LTS
- Installation method: Installed binary from tarball (https://github.com/digitalocean/doctl/releases/download/v1.142.0/doctl-1.142.0-linux-amd64.tar.gz)
Additional Details:
Since the --user
arg is not marked as a requiredOpt()
in
Lines 1239 to 1240 in c74c583
AddStringFlag(cmdDatabasePoolCreate, doctl.ArgDatabasePoolUserName, "", "", | |
"The username for the database user") |
I believe the problem lies with
Lines 1344 to 1348 in c74c583
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.