options

Configuration options are defined using HCL options blocks in one or more Steampipe config files. Steampipe will load ALL configuration files from ~/.steampipe/config that have a .spc extension. By default, Steampipe creates a ~/.steampipe/config/default.spc file for setting options.

Note that many of the options settings can also be specified via other mechanisms, such as command line arguments, environment variables, etc. These settings are resolved in a standard order:

  1. Explicitly set in session (via a meta-command).
  2. Specified in command line argument.
  3. Set in an environment variable.
  4. Set in a configuration file options argument.
  5. If not specified, a default value is used.

The following options are currently supported:

Option TypeDescription
databaseDatabase options.
generalGeneral CLI options, such as auto-update options.
pluginPlugin options.

Database Options

Database options are used to control database options, such as the IP address and port on which the database listens.

Supported options

ArgumentDefaultValuesDescription
cachetruetrue, falseEnable or disable query caching. This can also be set via the STEAMPIPE_CACHE environment variable.
cache_max_size_mbunlimitedan integerThe maximum total size of the query cache across all plugins. This can also be set via the STEAMPIPE_CACHE_MAX_SIZE_MB environment variable.
cache_max_ttl300an integerThe maximum length of time to cache query results, in seconds. This can also be set via the STEAMPIPE_CACHE_MAX_TTL environment variable.
listennetworklocal, networkThe network listen mode when Steampipe is started in service mode. Use network to listen on all IP addresses, or local to restrict to localhost.
port9193any valid, open port numberThe TCP port that Postgres will listen on.
search_pathAll connections, alphabeticallyComma separated stringSet an exact search path. Note that setting the search path in the database options sets it in the database; this setting will also be in effect when connecting to Steampipe from 3rd-party tools. See also: Using search_path to target connections and aggregators.
search_path_prefixnoneComma separated stringMove one or more connections or aggregators to the front of the search path. Note that setting the search path prefix in the database options sets in the database; this setting will also be in effect when connecting to Steampipe from 3rd-party tools. See also: Using search_path to target connections and aggregators.
start_timeout30an integerThe maximum time (in seconds) to wait for the Postgres process to start accepting queries after it has been started. This can also be set via the STEAMPIPE_DATABASE_START_TIMEOUT environment variable.

Example: Database Options

options "database" {
cache = true # true, false
cache_max_ttl = 900 # max expiration (TTL) in seconds
cache_max_size_mb = 1024 # max total size of cache across all plugins
port = 9193 # any valid, open port number
listen = "local" # local, network
search_path_prefix = "aws,aws2,gcp,gcp2" # comma-separated string; an exact search_path
start_timeout = 30 # maximum time (in seconds) to wait for the database to start up
}

General options

General options apply generally to the Steampipe CLI.

Supported options

ArgumentDefaultValuesDescription
log_levelwarntrace, debug, info, warn, errorSets the output logging level. Standard log levels are supported. This can also be set via the STEAMPIPE_LOG_LEVEL environment variable.
memory_max_mb1024Set a memory soft limit for the steampipe process. Set to 0 to disable the memory limit. This can also be set via the STEAMPIPE_MEMORY_MAX_MB environment variable.
telemetrynonenone, infoSet the telemetry level in Steampipe. This can also be set via the STEAMPIPE_TELEMETRY environment variable. See also: Telemetry.
update_checktruetrue, falseEnable or disable automatic update checking. This can also be set via the STEAMPIPE_UPDATE_CHECK environment variable.

Example: General Options

options "general" {
log_level = "warn" # trace, debug, info, warn, error
memory_max_mb = 512 # megabytes
telemetry = "info" # info, none
update_check = true # true, false
}

Plugin Options

Plugin options are used to set plugin default options, such as memory soft limits.

Supported options

ArgumentDefaultValuesDescription
memory_max_mb1024Set a default memory soft limit for each plugin process. Note that each plugin can have its own memory_max_mb set in a plugin definition, and that value would override this default setting. Set to 0 to disable the memory limit. This can also be set via the STEAMPIPE_PLUGIN_MEMORY_MAX_MB environment variable.

Example: Plugin Options

options "plugin" {
memory_max_mb = 2048 # megabytes
}