Discover cloud databases from the CLI
Use cloud discovery when you know a database is available through your cloud account but need to find its endpoint from the terminal. Discovery lists resources that the configured provider can see, then lets you choose one for a local CLI connection.
This is an opt-in CLI feature. It does not add cloud-provider administration to the CE browser workspace.
Enable the provider you need#
Configure the environment for the process that runs the CLI. Provider support is disabled by default.
| Variable | Purpose |
|---|---|
WHODB_ENABLE_AWS_PROVIDER=true | Enable AWS discovery |
WHODB_AWS_PROVIDER | AWS provider definitions as JSON |
WHODB_ENABLE_AZURE_PROVIDER=true | Enable Azure discovery |
WHODB_AZURE_PROVIDER | Azure provider definitions as JSON |
WHODB_ENABLE_GCP_PROVIDER=true | Enable GCP discovery |
WHODB_GCP_PROVIDER | GCP provider definitions as JSON |
Use whodb cloud --help and the provider-specific configuration for the required definition fields. The CLI uses the credential sources available to the user running it, so run the check in the same environment you will use for discovery.
Inspect discovery#
Start by listing provider definitions and testing the one you intend to use:
Bash
whodb cloud providers list
whodb cloud providers test <provider-id>
whodb cloud providers refresh --all
whodb cloud connections list
Replace <provider-id> with an ID returned by the first command. Review the account and resource details in the output before connecting. A similarly named development and production resource can be easy to confuse.
If the list is empty, check whether the provider is enabled and whether its configured credentials can discover the intended resources. Discovery permissions and database login permissions are separate checks.
Connect to a discovered resource#
Use the resource ID returned by discovery:
Bash
whodb connect --discovered <discovered-resource-id>
To save a connection from the discovered resource, inspect whodb connections add --help for the available options.
Discovery finds connection information. It does not create a network route, open a firewall, or prove that database credentials will be accepted. Verify reachability and database authentication if the connection fails.
For a browser connection, enter the discovered endpoint in the normal source form. See Connection options and CLI & MCP.
Was this page helpful?