Skip to main content

Config for postgresql

Jobs that use the postgresql adaptor may require authentication. A "credential" for the postgresql adaptor will follow the schema below. When using the CLI, you can set up your own state.configuration by using the sample below.

Sample Configuration​

Paste this into the configuration key of your state.json file and modify the values to run jobs locally.

{
"host": "some-host.compute-1.amazonaws.com",
"user": "admin",
"database": "demo-db",
"password": "@super(!)Secretpass"
}

Full Schema​

The full configuration schema describes each attribute of the credential and notes those that are required.

{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"host": {
"title": "Host",
"type": "string",
"description": "Postgres instance host URL or IP address",
"minLength": 1,
"examples": [
"some-host.compute-1.amazonaws.com",
"201.220.61.246"
]
},
"port": {
"title": "Port",
"type": "integer",
"default": 5432,
"description": "Database instance port",
"minLength": 1,
"examples": [
5432
]
},
"database": {
"title": "Database",
"type": "string",
"description": "The database name",
"minLength": 1,
"examples": [
"demo-db"
]
},
"user": {
"title": "User",
"type": "string",
"description": "User name",
"minLength": 1,
"examples": [
"admin"
]
},
"password": {
"title": "Password",
"type": "string",
"description": "Password",
"writeOnly": true,
"minLength": 1,
"examples": [
"@super(!)Secretpass"
]
},
"ssl": {
"title": "Use SSL",
"type": "boolean",
"examples": [
true
]
},
"allowSelfSignedCert": {
"title": "Allow self-signed certificate",
"type": "boolean",
"examples": [
true
]
}
},
"type": "object",
"additionalProperties": true,
"required": [
"host",
"user",
"database",
"password"
]
}