steampipe

The steampipe connection can be used to access a Steampipe database.

connection "steampipe" "steampipe_connection" {
host = "localhost"
port = 9193
db = "steampipe"
username = "steampipe"
password = "mypassword123"
}

Arguments

NameTypeRequired?Description
dbStringOptionalDatabase name. Defaults to steampipe.
hostStringOptionalDatabase hostname. Defaults to 127.0.0.1.
passwordStringOptionalDatabase password.
portNumberOptionalDatabase port. Defaults to 9193.
search_pathStringOptionalDatabase search path.
search_path_prefixStringOptionalDatabase search path prefix.
ssl_modeStringOptionalPostgreSQL SSL Mode, one of disable, allow, prefer, require, verify-ca, verify-full. The default is require.
usernameStringOptionalDatabase username. Default is steampipe.

All arguments are optional, and a steampipe connection with no arguments will behave the same as the default connection.

Attributes (Read-Only)

AttributeTypeDescription
connection_stringStringThe connection string built from the arguments to this connection, in the format postgresql://[username[:password]@][host][:port][/db]
envMapA map of the resolved libpq environment variables (PGHOST, PGDATABASE, PGUSER, PGPASSWORD, PGPORT, PGSSLNEGOTIATION)

Default Connection

The steampipe connection type includes an implicit, default connection (connection.steampipe.default) that will be configured to use the local Steampipe instance, eg:

host = "localhost"
port = 9193
db = "steampipe"
username = "steampipe"