YAML for PostgreSQL

View as Markdown

PostgreSQL target for executing queries on a PostgreSQL database.

YAML parameters for PostgreSQL

PARAMETERS
hostrequiredstring
The hostname or IP address of the PostgreSQL server
targetrequiredstring
The human-readable ID of the target
portstring
The port of the PostgreSQL server. Default: 5432
databasestring
The default database name
ssl_modestring enum
SSL connection mode. Default: REQUIRE (encrypted, server certificate not validated), applied on the tunneled hop too when a proxy is set. VERIFY_FULL with a proxy requires the server certificate to cover the tunnel endpoint (127.0.0.1) in its SAN, otherwise hostname validation fails.
Allowed enum:
DISABLE,
REQUIRE,
VERIFY_FULL
ca_certificatestring
PEM-encoded CA certificate (required when ssl_mode is VERIFY_FULL)
authPostgresqlAuthYaml
PostgreSQL authentication credentials
proxystring
SSH proxy target for tunneling to private PostgreSQL servers
permissionsPermissionsYaml
Access permissions for the target
namestring
The name of the target
disabledboolean
Indicates if this target is disabled (default: false)
tagsstring[]
The list of tags associated with the target
use_asUseAsYaml
Defines how the target can be used (as deployment target, proxy, or both)
notestring
Note for this resource
agent_notestring
YAML note for AI agents operating on this resource
typestring

Value: POSTGRESQL

Last modified on Oct 26, 2026

YAML examples for PostgreSQL

PostgreSQL target with SSL verification

yaml
- target: postgresql-prod type: POSTGRESQL name: Production PostgreSQL host: db.internal.example.com port: '5432' database: production ssl_mode: VERIFY_FULL ca_certificate: | -----BEGIN CERTIFICATE----- <paste the CA that signed the server certificate here> -----END CERTIFICATE----- auth: username: postgres password: secured

With Proxy

yaml
- target: postgresql-behind-bastion type: POSTGRESQL name: PostgreSQL in a private network host: db.internal.example.com port: '5432' database: production ssl_mode: REQUIRE proxy: ssh-bastion auth: username: postgres password: secured

Minimal

yaml
- target: postgresql type: POSTGRESQL host: db.internal.example.com auth: username: postgres password: secured