Documentation for `scw config`
The CLI documentation pages are currently under construction
The content is up to date. We're making improvements to the site over the next few weeks for a better experience.
Config management engine is common across all Scaleway developer tools (CLI, terraform, SDK, ... ). It allows to handle Scaleway config through two ways: environment variables and/or config file. Default path for configuration file is based on the following priority order:
- $SCW_CONFIG_PATH
- $XDG_CONFIG_HOME/scw/config.yaml
- $HOME/.config/scw/config.yaml
- $USERPROFILE/.config/scw/config.yaml
In this CLI, environment variables have priority over the configuration file.
The following environment variables are supported:
| Environment Variable | Description |
|---|---|
| SCW_ACCESS_KEY | The access key of a token (create a token at https://console.scaleway.com/iam/api-keysOpen in new context) |
| SCW_SECRET_KEY | The secret key of a token (create a token at https://console.scaleway.com/iam/api-keysOpen in new context) |
| SCW_DEFAULT_ORGANIZATION_ID | The default organization ID (get your organization ID at https://console.scaleway.com/iam/api-keysOpen in new context) |
| SCW_DEFAULT_PROJECT_ID | The default project ID (get your project ID at https://console.scaleway.com/iam/api-keysOpen in new context) |
| SCW_DEFAULT_REGION | The default region |
| SCW_DEFAULT_ZONE | The default availability zone |
| SCW_API_URL | URL of the API |
| SCW_INSECURE | Set this to true to enable the insecure mode |
| SCW_PROFILE | Set the config profile to use |
Read more about the config management engine at https://github.com/scaleway/scaleway-sdk-go/tree/master/scw#scaleway-configOpen in new context
- Destroy the config file
- Dump the config file
- Edit the configuration file
- Get a value from the config file
- Import configurations from another file
- Get config values from the config file for the current profile
- Allows the activation and deletion of a profile from the config file
- Reset the config
- Set a line from the config file
- Unset a line from the config file
- Validate the config
Destroy the config file
Usage:
Code
Dump the config file
Usage:
Code
Edit the configuration file
Edit the configuration file with the default editor
Edit the configuration file with the default editor
Usage:
Code
Get a value from the config file
Usage:
Code
Args:
| Name | Description | |
|---|---|---|
| key | RequiredOne of: access-key, secret-key, api-url, insecure, default-organization-id, default-project-id, default-region, default-zone, send-telemetry | the key to get from the config |
Examples:
Get the default organization ID
Code
Get the default region of the profile 'prod'
Code
Import configurations from another file
Usage:
Code
Args:
| Name | Description | |
|---|---|---|
| file | Required | Path to the configuration file to import |
Get config values from the config file for the current profile
Usage:
Code
Examples:
Get the default config values
Code
Get the config values of the profile 'prod'
Code
Allows the activation and deletion of a profile from the config file
Mark a profile as active in the config file
Usage:
Code
Args:
| Name | Description | |
|---|---|---|
| profile-name | Required |
Delete a profile from the config file
Usage:
Code
Args:
| Name | Description | |
|---|---|---|
| name | Required |
List all profiles in the config file
Usage:
Code
Reset the config
Usage:
Code
Set a line from the config file
This commands overwrites the configuration file parameters with user input. The only allowed attributes are access_key, secret_key, default_organization_id, default_region, default_zone, api_url, insecure
This commands overwrites the configuration file parameters with user input. The only allowed attributes are access_key, secret_key, default_organization_id, default_region, default_zone, api_url, insecure
Usage:
Code
Args:
| Name | Description | |
|---|---|---|
| access-key | A Scaleway access key | |
| secret-key | A Scaleway secret key | |
| api-url | Scaleway API URL | |
| insecure | Set to true to allow insecure HTTPS connections | |
| default-organization-id | A default Scaleway organization id | |
| default-project-id | A default Scaleway project id | |
| default-region | One of: fr-par, nl-ams, pl-waw, it-mil | A default Scaleway region |
| default-zone | One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 | A default Scaleway zone |
| send-telemetry | Set to false to disable telemetry |
Examples:
Update the default organization ID
Code
Update the default region of the profile 'prod'
Code
Unset a line from the config file
Usage:
Code
Args:
| Name | Description | |
|---|---|---|
| key | RequiredOne of: access-key, secret-key, api-url, insecure, default-organization-id, default-project-id, default-region, default-zone, send-telemetry | the config config key name to unset |
Validate the config
This command validates the configuration of your Scaleway CLI tool.
It performs the following checks:
Code
The command goes through each profile present in the config file and validates it.
This command validates the configuration of your Scaleway CLI tool.
It performs the following checks:
Code
The command goes through each profile present in the config file and validates it.
Usage:
Code