workspace

A Powerpipe workspace is a "profile" that allows you to define options for running Powerpipe.

workspace "default" {
update_check = true
log_level = "info"
memory_max_mb = "2048"
listen = "local"
}
workspace "my_server" {
listen = "network"
port = 9033
update_check = false
memory_max_mb = 2048
}

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

powerpipe server --workspace my_server

To learn more, see Managing Workspaces →

Arguments

ArgumentDefaultDescription                                                                                             
basenoneA reference to a named workspace resource that this workspace should source its definition from. Any argument can be overridden after sourcing via base.
benchmark_timeout0 (no timeout)Set the benchmark execution timeout, in seconds.
dashboard_timeout0 (no timeout)Set the dashboard execution timeout, in seconds.
databasepostgres://steampipe@
127.0.0.1:9193/steampipe
A database connection string or Turbot Pipes workspace to use as the default database. The default is a local Steampipe instance.
headertrueEnable or disable column headers.
inputtrueEnable/Disable interactive prompts for missing variables. To disable prompts and fail on missing variables, set it to false. This is useful when running from scripts.
listennetworkSpecifies the IP addresses on which powerpipe server will listen for connections from clients. Currently supported values are local (localhost only) or network (all IP addresses).
log_leveloffSet the logging output level
max_parallel10Set the maximum number of parallel executions. This is essentially a connection pool size; Powerpipe will attempt to run up to this many queries in parallel.
memory_max_mb1024Set a memory soft limit for the powerpipe process. Set to 0 to disable the memory limit.
outputprettySet the console output format: pretty, plain, yaml or json.
pipes_hostpipes.turbot.comSet the Turbot Pipes host for connecting to Turbot Pipes workspace.
pipes_tokenToken frompowerpipe loginSet the Turbot Pipes authentication token for connecting to a Turbot Pipes workspace. This may be a token obtained by powerpipe login or a user-generated token.
port9033Specifies the TCP port on which powerpipe server will listen for connections from clients.
progresstrueEnable or disable progress information.
query_timeout300The maximum time (in seconds) a query is allowed to run before it times out.
search_pathpublic, then alphabeticalA comma-separated list of connections to use as a custom search path for the control run. This setting only applies to Postgres databases (including Steampipe).
search_path_prefixnoneA comma-separated list of connections to use as a prefix to the current search path for the control run. This setting only applies to Postgres databases (including Steampipe).
separator,Set csv output separator.
snapshot_locationPipes user's workspaceSet the Turbot Pipes workspace or filesystem path for writing snapshots.
telemetryinfoSet the telemetry level in Powerpipe: info or none
timingfalseEnable or disable query execution timing.
update_checktrueEnable or disable automatic update checking.
watchtrueWatch .mod files for changes when running powerpipe server.

Workspaces are defined using the workspace block in one or more Powerpipe config files. Powerpipe will load ALL configuration files (*.ppc) from every directory in the configuration search path, with decreasing precedence. The set of workspaces is the union of all workspaces defined in these directories.

The workspace named default is special; If a workspace named default exists, it will be used whenever the --workspace argument is not passed to Powerpipe. Creating a default workspace in ~/.powerpipe/config/workspaces.ppc provides a way to set all defaults.

Note that the HCL argument names are the same as the equivalent CLI argument names, except using an underscore in place of a dash:

Workspace ArgumentEnvironment VariableArgument
benchmark_timeoutPOWERPIPE_BENCHMARK_TIMEOUT--benchmark-timeout
dashboard_timeoutPOWERPIPE_DASHBOARD_TIMEOUT--dashboard-timeout
databasePOWERPIPE_DATABASE--database
headernone--header
inputnone--input
listenPOWERPIPE_LISTEN--listen
log_levelPOWERPIPE_LOG_LEVEL
max_parallelPOWERPIPE_MAX_PARALLEL--max-parallel
memory_max_mbPOWERPIPE_MEMORY_MAX_MB
outputnone--output
pipes_hostPIPES_HOST--pipes-host
pipes_tokenPIPES_TOKEN--pipes-token
portPOWERPIPE_PORT--port
progressnone--progress
query_timeoutPOWERPIPE_QUERY_TIMEOUT--query_timeout
search_pathnone--search-path
search_path_prefixnone--search-path-prefix
separatornone--separator
snapshot_locationPOWERPIPE_SNAPSHOT_LOCATION--snapshot-location
telemetryPOWERPIPE_TELEMETRY
timingnone--timing
update_checkPOWERPIPE_UPDATE_CHECK
watchnone--watch

Examples

workspace "server" {
listen = "network"
port = 9033
update_check = false
memory_max_mb = 2048
log_level = "info"
}
workspace "default" {
output = "pretty"
update_check = true
telemetry = "info"
memory_max_mb = 1024
}
workspace "dev_server" {
base = workspace.server
log_level = "debug"
port = 9195
}
workspace "pipes" {
pipes_host = "vandelay.pipes.turbot.com"
snapshot_location = "vandelay/latex"
database = "vandelay/latex"
}
workspace "all_options" {
# Dashboard / API Server Options
listen = "network"
port = 9033
watch = true
# General Options
telemetry = "info"
update_check = true
log_level = "info"
memory_max_mb = "1024"
input = true
# Pipes Integration Options
pipes_host = "pipes.turbot.com"
pipes_token = "tpt_999faketoken99999999_111faketoken1111111111111"
snapshot_location = "acme/dev"
# DB Settings
database = "postgres://steampipe@127.0.0.1:9193/steampipe"
query_timeout = 300
max_parallel = 5
# Execution timeouts
dashboard_timeout = 300
benchmark_timeout = 1800
# Search Path Settings (Postgres-specific)
search_path = "aws,aws_1,aws_2,gcp,gcp_1,gcp_2,slack,github"
search_path_prefix = "aws_all"
# Output Options
output = "csv"
progress = true
header = true
separator = ","
timing = true
}