From 0820934440983d38bdb079aecc108c098bb427fc Mon Sep 17 00:00:00 2001 From: Quentin Brosse Date: Fri, 11 Sep 2020 14:06:43 +0200 Subject: [PATCH] doc(core): update credentials links --- README.md | 4 +--- example_test.go | 10 +++++----- scw/README.md | 10 +++++----- scw/config.go | 2 +- scw/config_test.go | 6 +++--- 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index f222e3dbe..69a35f402 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,8 @@ # Scaleway GO SDK - **:warning: This is an early release, keep in mind that the API can break** - Scaleway is a single way to create, deploy and scale your infrastructure in the cloud. We help thousands of businesses to run their infrastructures easily. ## Documentation @@ -42,7 +40,7 @@ func main() { // Create a Scaleway client client, err := scw.NewClient( - // Get your credentials at https://console.scaleway.com/account/credentials + // Get your credentials at https://console.scaleway.com/project/credentials scw.WithDefaultOrganizationID("ORGANISATION_ID"), scw.WithAuth("ACCESS_KEY", "SECRET_KEY"), ) diff --git a/example_test.go b/example_test.go index bf2d60f59..e3b9ce334 100644 --- a/example_test.go +++ b/example_test.go @@ -12,7 +12,7 @@ import ( func Example_apiClient() { // Create a Scaleway client client, err := scw.NewClient( - scw.WithAuth("ACCESS_KEY", "SECRET_KEY"), // Get your credentials at https://console.scaleway.com/account/credentials + scw.WithAuth("ACCESS_KEY", "SECRET_KEY"), // Get your credentials at https://console.scaleway.com/project/credentials ) if err != nil { // handle error @@ -59,7 +59,7 @@ func Example_apiClientWithConfig() { func Example_listServers() { // Create a Scaleway client client, err := scw.NewClient( - scw.WithAuth("ACCESS_KEY", "SECRET_KEY"), // Get your credentials at https://console.scaleway.com/account/credentials + scw.WithAuth("ACCESS_KEY", "SECRET_KEY"), // Get your credentials at https://console.scaleway.com/project/credentials ) if err != nil { // handle error @@ -83,7 +83,7 @@ func Example_listServers() { func Example_createServer() { // Create a Scaleway client client, err := scw.NewClient( - scw.WithAuth("ACCESS_KEY", "SECRET_KEY"), // Get your credentials at https://console.scaleway.com/account/credentials + scw.WithAuth("ACCESS_KEY", "SECRET_KEY"), // Get your credentials at https://console.scaleway.com/project/credentials scw.WithDefaultOrganizationID("ORGANIZATION_ID"), scw.WithDefaultZone(scw.ZoneFrPar1), ) @@ -123,7 +123,7 @@ func Example_createServer() { func Example_rebootAllServers() { // Create a Scaleway client client, err := scw.NewClient( - scw.WithAuth("ACCESS_KEY", "SECRET_KEY"), // Get your credentials at https://console.scaleway.com/account/credentials + scw.WithAuth("ACCESS_KEY", "SECRET_KEY"), // Get your credentials at https://console.scaleway.com/project/credentials scw.WithDefaultZone(scw.ZoneFrPar1), ) if err != nil { @@ -160,7 +160,7 @@ func Example_rebootAllServers() { func Example_createLoadBalancer() { // Create a Scaleway client client, err := scw.NewClient( - scw.WithAuth("ACCESS_KEY", "SECRET_KEY"), // Get your credentials at https://console.scaleway.com/account/credentials + scw.WithAuth("ACCESS_KEY", "SECRET_KEY"), // Get your credentials at https://console.scaleway.com/project/credentials ) if err != nil { // handle error diff --git a/scw/README.md b/scw/README.md index 2ec60b830..064989e37 100644 --- a/scw/README.md +++ b/scw/README.md @@ -5,7 +5,7 @@ Recommended config file: ```yaml -# Get your credentials on https://console.scaleway.com/account/credentials +# Get your credentials on https://console.scaleway.com/project/credentials access_key: SCWXXXXXXXXXXXXXXXXX secret_key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx default_organization_id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx @@ -46,10 +46,10 @@ scw.NewClient( | Variable | Description | Legacy variables | | :----------------------------- | :----------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------ | -| `$SCW_ACCESS_KEY` | Access key of a token ([get yours](https://console.scaleway.com/account/credentials)) | `$SCALEWAY_ACCESS_KEY` (used by terraform) | -| `$SCW_SECRET_KEY` | Secret key of a token ([get yours](https://console.scaleway.com/account/credentials)) | `$SCW_TOKEN` (used by cli), `$SCALEWAY_TOKEN` (used by terraform), `$SCALEWAY_ACCESS_KEY` (used by terraform) | -| `$SCW_DEFAULT_ORGANIZATION_ID` | Your default organization ID ([get yours](https://console.scaleway.com/account/credentials)) | `$SCW_ORGANIZATION` (used by cli),`$SCALEWAY_ORGANIZATION` (used by terraform) | -| `$SCW_DEFAULT_PROJECT_ID` | Your default project ID ([get yours](https://console.scaleway.com/account/credentials)) | | +| `$SCW_ACCESS_KEY` | Access key of a token ([get yours](https://console.scaleway.com/project/credentials)) | `$SCALEWAY_ACCESS_KEY` (used by terraform) | +| `$SCW_SECRET_KEY` | Secret key of a token ([get yours](https://console.scaleway.com/project/credentials)) | `$SCW_TOKEN` (used by cli), `$SCALEWAY_TOKEN` (used by terraform), `$SCALEWAY_ACCESS_KEY` (used by terraform) | +| `$SCW_DEFAULT_ORGANIZATION_ID` | Your default organization ID ([get yours](https://console.scaleway.com/project/credentials)) | `$SCW_ORGANIZATION` (used by cli),`$SCALEWAY_ORGANIZATION` (used by terraform) | +| `$SCW_DEFAULT_PROJECT_ID` | Your default project ID ([get yours](https://console.scaleway.com/project/credentials)) | | | `$SCW_DEFAULT_REGION` | Your default [region](https://developers.scaleway.com/en/quickstart/#region-and-zone) | `$SCW_REGION` (used by cli),`$SCALEWAY_REGION` (used by terraform) | | `$SCW_DEFAULT_ZONE` | Your default [availability zone](https://developers.scaleway.com/en/quickstart/#region-and-zone) | `$SCW_ZONE` (used by cli),`$SCALEWAY_ZONE` (used by terraform) | | `$SCW_API_URL` | Url of the API | - | diff --git a/scw/config.go b/scw/config.go index eb423162f..34b576960 100644 --- a/scw/config.go +++ b/scw/config.go @@ -30,7 +30,7 @@ const configFileTemplate = `# Scaleway configuration file # - Scaleway Terraform Provider (https://www.terraform.io/docs/providers/scaleway/index.html) # You need an access key and a secret key to connect to Scaleway API. -# Generate your token at the following address: https://console.scaleway.com/account/credentials +# Generate your token at the following address: https://console.scaleway.com/project/credentials # An access key is a secret key identifier. {{ if .AccessKey }}access_key: {{.AccessKey}}{{ else }}# access_key: SCW11111111111111111{{ end }} diff --git a/scw/config_test.go b/scw/config_test.go index d704b0e47..859c8f03e 100644 --- a/scw/config_test.go +++ b/scw/config_test.go @@ -643,7 +643,7 @@ func TestConfig_ConfigFile(t *testing.T) { # - Scaleway Terraform Provider (https://www.terraform.io/docs/providers/scaleway/index.html) # You need an access key and a secret key to connect to Scaleway API. -# Generate your token at the following address: https://console.scaleway.com/account/credentials +# Generate your token at the following address: https://console.scaleway.com/project/credentials # An access key is a secret key identifier. # access_key: SCW11111111111111111 @@ -721,7 +721,7 @@ func TestConfig_ConfigFile(t *testing.T) { # - Scaleway Terraform Provider (https://www.terraform.io/docs/providers/scaleway/index.html) # You need an access key and a secret key to connect to Scaleway API. -# Generate your token at the following address: https://console.scaleway.com/account/credentials +# Generate your token at the following address: https://console.scaleway.com/project/credentials # An access key is a secret key identifier. access_key: SCW1234567890ABCDEFG @@ -813,7 +813,7 @@ access_key: SCW1234567890ABCDEFG # - Scaleway Terraform Provider (https://www.terraform.io/docs/providers/scaleway/index.html) # You need an access key and a secret key to connect to Scaleway API. -# Generate your token at the following address: https://console.scaleway.com/account/credentials +# Generate your token at the following address: https://console.scaleway.com/project/credentials # An access key is a secret key identifier. access_key: SCW1234567890ABCDEFG