workspace

A Steampipe workspace is a "profile" that allows you to define a unified environment that the Steampipe client can interact with. Each workspace is composed of a single Steampipe database instance as well as other context-specific settings and options.

Workspace configurations can be defined in any .spc file in the ~/.steampipe/config directory, but by convention they are defined in ~/.steampipe/config/workspaces.spc file. This file may contain multiple workspace definitions that can then be referenced by name.

Steampipe workspaces allow you to define multiple named configurations and easily switch between them using the --workspace argument or STEAMPIPE_WORKSPACE environment variable.

workspace "local" {
workspace_database = "local"
}
workspace "acme_prod" {
workspace_database = "acme/prod"
query_timeout = 600
}

To learn more, see Managing Workspaces →

Workspace Arguments

Many of the workspace arguments correspond to CLI flags and/or environment variables. Any unset arguments will assume the default values.

ArgumentDefaultDescription
baseA reference to a named workspace resource that this workspace should source its definition from. Any argument can be overridden after sourcing via base.
cachetrueEnable/disable caching. Note that is a client setting - if the database (options "database") has the cache disabled, then the cache is disabled regardless of the workspace setting.

Env: STEAMPIPE_CACHE
cache_ttl300Set the client query cache expiration (TTL) in seconds. Note that is a client setting - if the database cache_max_ttl is lower than the cache_ttl in the workspace, then the effective ttl for this workspace is the cache_max_ttl.

Env: STEAMPIPE_CACHE_TTL
install_dir~/.steampipeThe directory in which the Steampipe database, plugins, and supporting files can be found.

Env: STEAMPIPE_INSTALL_DIR
CLI: --install-dir
optionsAn options block to set command-specific options for this workspace. Query, check, and dashboard options are supported.
pipes_hostpipes.turbot.comSet the Turbot Pipes host for connecting to Turbot Pipes workspace.

Env: PIPES_HOST
CLI: --pipes-host
pipes_tokenThe token obtained by steampipe loginSet the Turbot Pipes authentication token for connecting to a Turbot Pipes workspace. This may be a token obtained by steampipe login or a user-generated token.

Env: PIPES_TOKEN
CLI: --pipes-token
progresstrueEnable or disable progress information.

CLI: --progress
query_timeout240 for controls, unlimited otherwiseThe maximum time (in seconds) a query is allowed to run before it times out.

Env: STEAMPIPE_QUERY_TIMEOUT
CLI: --query_timeout
search_pathpublic, then alphabeticalA comma-separated list of connections to use as a custom search path for the control run. See also: Using search_path to target connections and aggregators.

CLI: --search-path
search_path_prefixA comma-separated list of connections to use as a prefix to the current search path for the control run. See also: Using search_path to target connections and aggregators.

CLI: --search-path-prefix
snapshot_locationThe Turbot Pipes user's personal workspaceSet the Turbot Pipes workspace or filesystem path for writing snapshots.

Env: STEAMPIPE_SNAPSHOT_LOCATION
CLI: --snapshot-location
workspace_databaselocalWorkspace database. This can be local or a remote Turbot Pipes database.

Env: STEAMPIPE_WORKSPACE_DATABASE
CLI: --workspace-database

Steampipe Query Options

A workspace may include an options "query" block to specify values specific to the steampipe query command.

These options often correspond to CLI flags.

ArgumentDefaultDescription
autocompletetrueEnable or disable autocomplete in the interactive query shell.
headertrueEnable or disable column headers.

CLI: --header
multifalseEnable or disable multiline mode.
outputtableSet output format (json, csv, table, or line).

CLI: --output
separator,Set csv output separator.

CLI: --separator
timingoffEnable or disable query execution timing: off, on, or verbose

CLI: --timing

Examples

workspace "default" {
query_timeout = 300
}
workspace "all_options" {
pipes_host = "pipes.turbot.com"
pipes_token = "tpt_999faketoken99999999_111faketoken1111111111111"
install_dir = "~/steampipe2"
query_timeout = 300
workspace_database = "local"
snapshot_location = "acme/dev"
search_path = "aws,aws_1,aws_2,gcp,gcp_1,gcp_2,slack,github"
search_path_prefix = "aws_all"
progress = true
cache = true
cache_ttl = 300
options "query" {
autocomplete = true
header = true # true, false
multi = false # true, false
output = "table" # json, csv, table, line
separator = "," # any single char
timing = "on" # on, off, verbose
}
}