-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(DVT): Add config.yaml doc and update CLi doc MTA-4434 (#3102)
* docs(DVT): Add config.yaml doc and update CLi doc MTA-4434 * docs(DVT): update * docs(DVT): update
- Loading branch information
1 parent
220e132
commit 8b610ca
Showing
9 changed files
with
204 additions
and
22 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
developer-tools/scaleway-cli/reference-content/environment-variables.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
developer-tools/scaleway-cli/reference-content/scaleway-configuration-file.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
meta: | ||
title: Scaleway CLI - Configuration file | ||
description: This page explains what is the Scaleway configuration file for developer tools and how to use it. | ||
content: | ||
h1: Scaleway CLI - Configuration file | ||
paragraph: This page explains what is the Scaleway configuration file for developer tools and how to use it. | ||
tags: developer tools cli configuration config | ||
dates: | ||
validation: 2024-04-23 | ||
posted: 2023-04-23 | ||
categories: | ||
- devtools | ||
--- | ||
|
||
<Macro id="scaleway-configuration-file" /> |
16 changes: 16 additions & 0 deletions
16
developer-tools/scaleway-sdk/reference-content/environment-variables.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
meta: | ||
title: Scaleway SDKs - environment variables | ||
description: This page contains a list of standardized environment variables used throughout the Scaleway developer tools. | ||
content: | ||
h1: Scaleway SDKs - environment variables | ||
paragraph: This page contains a list of standardized environment variables used throughout the Scaleway developer tools. | ||
tags: devtools cli api variables | ||
dates: | ||
validation: 2024-04-03 | ||
posted: 2023-05-15 | ||
categories: | ||
- devtools | ||
--- | ||
|
||
<Macro id="scaleway-environment-variables" /> |
16 changes: 16 additions & 0 deletions
16
developer-tools/scaleway-sdk/reference-content/scaleway-configuration-file.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
meta: | ||
title: Scaleway SDKs - Configuration file | ||
description: This page explains what is the Scaleway configuration file for developer tools and how to use it. | ||
content: | ||
h1: Scaleway SDKs - Configuration file | ||
paragraph: This page explains what is the Scaleway configuration file for developer tools and how to use it. | ||
tags: developer tools cli configuration config sdk | ||
dates: | ||
validation: 2024-04-23 | ||
posted: 2023-04-23 | ||
categories: | ||
- devtools | ||
--- | ||
|
||
<Macro id="scaleway-configuration-file" /> |
6 changes: 3 additions & 3 deletions
6
developer-tools/terraform/reference-content/environment-variables.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
developer-tools/terraform/reference-content/scaleway-configuration-file.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
meta: | ||
title: Terraform - Scaleway Configuration file | ||
description: This page explains what is the Scaleway configuration file for developer tools and how to use it. | ||
content: | ||
h1: Terraform - Scaleway Configuration file | ||
paragraph: This page explains what is the Scaleway configuration file for developer tools and how to use it. | ||
tags: developer tools cli api configuration config terraform | ||
dates: | ||
validation: 2024-04-23 | ||
posted: 2023-04-23 | ||
categories: | ||
- devtools | ||
--- | ||
|
||
<Macro id="scaleway-configuration-file" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
--- | ||
macro: scaleway-configuration-file | ||
--- | ||
|
||
## Configuration file Overview | ||
|
||
The Scaleway configuration file is a `config.yaml` file shared between the majority of the [Scaleway developer tools](https://www.scaleway.com/en/developers/#official-repos). It allows you to authenticate, and to determine the default values to use when creating resources with the developer tools. | ||
|
||
The configuration file contains the following elements: | ||
|
||
**access_key** | ||
: Your [Scaleway API access key](/identity-and-access-management/iam/how-to/create-api-keys/) | ||
|
||
**secret_key** | ||
: Your [Scaleway API secret key](/identity-and-access-management/iam/how-to/create-api-keys/) | ||
|
||
**default_organization_id** | ||
: The ID of the Scaleway Organization to use by default | ||
|
||
**default_project_id** | ||
: The ID of the Scaleway Project to use by default | ||
|
||
**default_zone** | ||
: The [availability zone](console/account/reference-content/products-availability/) to use by default | ||
|
||
**default_region** | ||
: The [region](console/account/reference-content/products-availability/) to use by default | ||
|
||
**api_url** | ||
: The API URL to use (`https://api.scaleway.com` by default) | ||
|
||
**insecure** | ||
: Parameter to allow insecure traffic on the client (`false` by default) | ||
|
||
**send-telemetry** | ||
: Parameter to disable the collection of diagnostic and usage data (`true` by default) | ||
|
||
**profiles** | ||
: A YAML dictionary that can contain different profiles (refer to the [example](macros/developer-tools/scaleway-configuration-file/#multi-profile-configuration-file) below) | ||
|
||
## How to set up the configuration file | ||
|
||
You can set up the Scaleway configuration file using several methods. However, we recommend that you use [The Scaleway CLI](/developer-tools/scaleway-cli/quickstart/). The `scw init` command allows you to initialize your configuration in just a few minutes. | ||
|
||
To initialize the configuration without the Scaleway CLI, you can simply create a `config.yaml` file in the appropriate folder: | ||
|
||
- a **custom directory** defined as `$SCW_CONFIG_PATH` | ||
|
||
- an **XDG** base directory: `$XDG_CONFIG_HOME/scw/config.yaml` | ||
|
||
- the **MacOS/Linux** home directory: `$HOME/.config/scw/config.yaml` | ||
|
||
- the **Windows** home directory: `%USERPROFILE%/.config/scw/config.yaml` | ||
|
||
## Configuration file example | ||
|
||
### Single profile configuration file | ||
|
||
```yaml | ||
access_key: EXAMPLESCW34P0XKFD4 | ||
secret_key: example-2b41-8d52-f888-8c8a460e | ||
default_organization_id: example-468g-4f65-a41e-8b40766c5fc5 | ||
default_project_id: example-468g-4f65-a41e-8b40766c5fc5 | ||
default_zone: fr-par-1 | ||
default_region: fr-par | ||
api_url: https://api.scaleway.com | ||
``` | ||
### Multi-profile configuration file | ||
```yaml | ||
profiles: | ||
myProfile1: | ||
access_key: EXAMPLESCW34P0XKFD4 | ||
secret_key: example-2b41-8d52-f888-8c8a460e | ||
default_organization_id: example-468g-4f65-a41e-8b40766c5fc5 | ||
default_project_id: example-468g-4f65-a41e-8b40766c5fc5 | ||
default_zone: fr-par-1 | ||
default_region: fr-par | ||
api_url: https://api.scaleway.com | ||
insecure: false | ||
|
||
myProfile2: | ||
access_key: EXAMPLESCW34PM3C0XK | ||
secret_key: example-2b41-460e-8d52-f8888c8a | ||
default_organization_id: example-776f-4f65-a41e-6c5fc58b4076 | ||
default_project_id: example-776f-4f65-a41e-6c5fc58b4076 | ||
default_zone: fr-par-2 | ||
default_region: fr-par | ||
api_url: https://api.scaleway.com | ||
insecure: true | ||
``` | ||
<Message type="note"> | ||
You can select the profile to use by either: | ||
- declaring it as the `$SCW_PROFILE` environment variable | ||
- using the `GetActiveProfile()` function in the SDKs | ||
- use the `--profile=<your-profile>` flag with the CLI | ||
</Message> | ||
|
||
## Troubleshooting | ||
|
||
- Make sure that you have generated and specified a valid `access_key` and `secret_key` pair. Refer to the [API keys](/identity-and-access-management/iam/how-to/create-api-keys/) documentation for more information. | ||
|
||
- Make sure that there is no conflicting environment variable set, such as `$SCW_ACCESS_KEY` and `$SCW_SECRET_KEY`. You can remove environment variables using the `unset` command as shown below: | ||
|
||
```bash | ||
unset $SCW_ACCESS_KEY $SCW_SECRET_KEY | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters