Configuration Management

bricks uses multiple configuration files, which are stored at $HOME/.bricks. Each file has a different purpose and used in different stages at runtime:

config.yaml

The file holds the core configuration of the bricks CLI, such as API endpoints, registry, initial user status and more. The bricks CLI will load config.yaml at the very begining and will use it for the entire life time.

Customers that deploy an on-premise solution might use this file.

// config.ymal Example
accountid: ""
autoupdate: false
backend_api_url: https://api.bluebricks.co
cloudformationstackid: ""
jwks_url: https://auth.bluebricks.co/.well-known/jwks.json
log: true
redirect_url_login: https://app.bluebricks.co/cli-sign-in
registry_url: https://registry.bluebricks.co
rolearnid: ""
server_port: "8989"
statusinterval: 0
telemetry: false
token: ""
userid: ""
web_app_url: https://app.bluebricks.co

environment.yaml

This file is used to store persistent configuration changes that were made by the CLI, following the user's instructions. For example, when a user decides to turn on telemetry or logs, the configuration will be saved in the environment.yaml file.

CLI loads environment.yaml file right after config.yaml and overwrites the configuration accordingly.

// environment.yaml example
accountid: ""
autoupdate: false
cloudformationstackid: ""
log: true
port: ""
rolearnid: ""
statusinterval: 0
telemetry: false

credentials.yaml

This file holds sensitive information about the user session such as its identifier (user id), and its API token. In the sequence of loading, credentials.yaml file is being loaded at last.

// credentials.yaml example
token: Bearer eyJhb...E2_A
userid: [email protected]

Changing Configuration Files

While manually changing configuration files is not recommended, developers occasionally need to use different configurations or environments for debugging.

The best way to modify the configuration is by duplicating the config.yaml file, located at $HOME/.bricks, and then editing its content.

When the duplicated configuration file is ready, developers can instruct the CLI to use it by adding the --config flag to any command.

~> bricks bp search --query="*" --config=./modified_config_file.yaml

Last updated

Was this helpful?