Scaleway logo
Commands

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 VariableDescription
SCW_ACCESS_KEYThe access key of a token (create a token at https://console.scaleway.com/iam/api-keysOpen in new context)
SCW_SECRET_KEYThe secret key of a token (create a token at https://console.scaleway.com/iam/api-keysOpen in new context)
SCW_DEFAULT_ORGANIZATION_IDThe default organization ID (get your organization ID at https://console.scaleway.com/iam/api-keysOpen in new context)
SCW_DEFAULT_PROJECT_IDThe default project ID (get your project ID at https://console.scaleway.com/iam/api-keysOpen in new context)
SCW_DEFAULT_REGIONThe default region
SCW_DEFAULT_ZONEThe default availability zone
SCW_API_URLURL of the API
SCW_INSECURESet this to true to enable the insecure mode
SCW_PROFILESet the config profile to use

Read more about the config management engine at https://github.com/scaleway/scaleway-sdk-go/tree/main/scw#scaleway-configOpen in new context

Destroy the config file

Usage:

TerminalCode
scw config destroy

Dump the config file

Usage:

TerminalCode
scw config dump

Edit the configuration file

Edit the configuration file with the default editor

Edit the configuration file with the default editor

Usage:

TerminalCode
scw config edit

Get a value from the config file

Usage:

TerminalCode
scw config get <key ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
keythe key to get from the configRequired
One of: access-key, secret-key, api-url, s3-endpoint, s3-use-path-style, insecure, default-organization-id, default-project-id, default-region, default-zone, send-telemetry, user-agent

Examples:

Get the default organization ID

TerminalCode
scw config get default-organization-id

Get the default region of the profile 'prod'

TerminalCode
scw -p prod config get default_region

Import configurations from another file

Usage:

TerminalCode
scw config import <file ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
filePath to the configuration file to importRequired

Get config values from the config file for the current profile

Usage:

TerminalCode
scw config info

Examples:

Get the default config values

TerminalCode
scw config info

Get the config values of the profile 'prod'

TerminalCode
scw -p prod config info

Allows the activation and deletion of a profile from the config file

Mark a profile as active in the config file

Usage:

TerminalCode
scw config profile activate <profile-name ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
profile-nameRequired

Delete a profile from the config file

Usage:

TerminalCode
scw config profile delete <name ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
nameRequired

List all profiles in the config file

Usage:

TerminalCode
scw config profile list

Reset the config

Usage:

TerminalCode
scw config reset

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:

TerminalCode
scw config set [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
access-keyA Scaleway access key
secret-keyA Scaleway secret key
api-urlScaleway API URL
insecureSet to true to allow insecure HTTPS connections
default-organization-idA default Scaleway organization id
default-project-idA default Scaleway project id
default-regionA default Scaleway regionOne of: fr-par, nl-ams, pl-waw, it-mil
default-zoneA default Scaleway zoneOne 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
send-telemetrySet to false to disable telemetry

Examples:

Update the default organization ID

TerminalCode
scw config set default_organization_id=12903058-d0e8-4366-89c3-6e666abe1f6f

Update the default region of the profile 'prod'

TerminalCode
scw -p prod config set default_region=nl-ams

Unset a line from the config file

Usage:

TerminalCode
scw config unset <key ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
keythe config config key name to unsetRequired
One of: access-key, secret-key, api-url, s3-endpoint, s3-use-path-style, insecure, default-organization-id, default-project-id, default-region, default-zone, send-telemetry, user-agent

Validate the config

This command validates the configuration of your Scaleway CLI tool.

It performs the following checks:

Code
- YAML syntax correctness: It checks whether your config file is a valid YAML file. - Field validity: It checks whether the fields present in the config file are valid and expected fields. This includes fields like AccessKey, SecretKey, DefaultOrganizationID, DefaultProjectID, DefaultRegion, DefaultZone, and APIURL. - Field values: For each of the fields mentioned above, it checks whether the value assigned to it is valid. For example, it checks if the AccessKey and SecretKey are non-empty and meet the format expectations.

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
- YAML syntax correctness: It checks whether your config file is a valid YAML file. - Field validity: It checks whether the fields present in the config file are valid and expected fields. This includes fields like AccessKey, SecretKey, DefaultOrganizationID, DefaultProjectID, DefaultRegion, DefaultZone, and APIURL. - Field values: For each of the fields mentioned above, it checks whether the value assigned to it is valid. For example, it checks if the AccessKey and SecretKey are non-empty and meet the format expectations.

The command goes through each profile present in the config file and validates it.

Usage:

TerminalCode
scw config validate