From e0744c84b2625a9cdf0546ab167217c4aa754714 Mon Sep 17 00:00:00 2001 From: Quentin Brosse Date: Fri, 11 Sep 2020 14:19:42 +0200 Subject: [PATCH 1/2] doc(core): update credentials links --- docs/commands/config.md | 6 +++--- internal/core/client.go | 2 +- internal/core/command_interceptor.go | 2 +- internal/namespaces/config/commands.go | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/commands/config.md b/docs/commands/config.md index b840a0211c..16fea6832d 100644 --- a/docs/commands/config.md +++ b/docs/commands/config.md @@ -10,9 +10,9 @@ 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/account/credentials)| -|SCW_SECRET_KEY|The secret key of a token (create a token at https://console.scaleway.com/account/credentials)| -|SCW_DEFAULT_ORGANIZATION_ID|The default organization ID (get your organization ID at https://console.scaleway.com/account/credentials)| +|SCW_ACCESS_KEY|The access key of a token (create a token at https://console.scaleway.com/project/credentials)| +|SCW_SECRET_KEY|The secret key of a token (create a token at https://console.scaleway.com/project/credentials)| +|SCW_DEFAULT_ORGANIZATION_ID|The default organization ID (get your organization ID at https://console.scaleway.com/project/credentials)| |SCW_DEFAULT_REGION|The default region| |SCW_DEFAULT_ZONE|The default availability zone| |SCW_API_URL|URL of the API| diff --git a/internal/core/client.go b/internal/core/client.go index 92637c24cd..03bde70fcd 100644 --- a/internal/core/client.go +++ b/internal/core/client.go @@ -103,7 +103,7 @@ More info: https://github.com/scaleway/scaleway-sdk-go/tree/master/scw#scaleway- // validateClient validate a client configuration and make sure all mandatory setting are present. // This function is only call for commands that require a valid client. func validateClient(client *scw.Client) error { - credentialsHint := "You can get your credentials here: https://console.scaleway.com/account/credentials" + credentialsHint := "You can get your credentials here: https://console.scaleway.com/project/credentials" accessKey, _ := client.GetAccessKey() if accessKey == "" { diff --git a/internal/core/command_interceptor.go b/internal/core/command_interceptor.go index 9bd6cf13f2..321858b62d 100644 --- a/internal/core/command_interceptor.go +++ b/internal/core/command_interceptor.go @@ -105,7 +105,7 @@ func sdkStdErrorInterceptor(ctx context.Context, args interface{}, runner Comman var hint string switch resourceName := sdkError.Resource; resourceName { case "account_token": - hint = "Try to generate a new token here https://console.scaleway.com/account/credentials" + hint = "Try to generate a new token here https://console.scaleway.com/project/credentials" } return nil, &CliError{ diff --git a/internal/namespaces/config/commands.go b/internal/namespaces/config/commands.go index 4daae8f818..72d70e3fcc 100644 --- a/internal/namespaces/config/commands.go +++ b/internal/namespaces/config/commands.go @@ -38,9 +38,9 @@ func configRoot() *core.Command { for _, envVar := range [][5]string{ {"|", "Environment Variable", "|", "Description", "|"}, {"|", "--", "|", "--", "|"}, - {"|", scw.ScwAccessKeyEnv, "|", "The access key of a token (create a token at https://console.scaleway.com/account/credentials)", "|"}, - {"|", scw.ScwSecretKeyEnv, "|", "The secret key of a token (create a token at https://console.scaleway.com/account/credentials)", "|"}, - {"|", scw.ScwDefaultOrganizationIDEnv, "|", "The default organization ID (get your organization ID at https://console.scaleway.com/account/credentials)", "|"}, + {"|", scw.ScwAccessKeyEnv, "|", "The access key of a token (create a token at https://console.scaleway.com/project/credentials)", "|"}, + {"|", scw.ScwSecretKeyEnv, "|", "The secret key of a token (create a token at https://console.scaleway.com/project/credentials)", "|"}, + {"|", scw.ScwDefaultOrganizationIDEnv, "|", "The default organization ID (get your organization ID at https://console.scaleway.com/project/credentials)", "|"}, {"|", scw.ScwDefaultRegionEnv, "|", "The default region", "|"}, {"|", scw.ScwDefaultZoneEnv, "|", "The default availability zone", "|"}, {"|", scw.ScwAPIURLEnv, "|", "URL of the API", "|"}, From 98960a47a630ddeff505017dd6437a6fd94992d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Tue, 15 Sep 2020 10:48:25 +0200 Subject: [PATCH 2/2] Add project id --- docs/commands/config.md | 1 + internal/namespaces/config/commands.go | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/commands/config.md b/docs/commands/config.md index 16fea6832d..f6576b5af2 100644 --- a/docs/commands/config.md +++ b/docs/commands/config.md @@ -13,6 +13,7 @@ The following environment variables are supported: |SCW_ACCESS_KEY|The access key of a token (create a token at https://console.scaleway.com/project/credentials)| |SCW_SECRET_KEY|The secret key of a token (create a token at https://console.scaleway.com/project/credentials)| |SCW_DEFAULT_ORGANIZATION_ID|The default organization ID (get your organization ID at https://console.scaleway.com/project/credentials)| +|SCW_DEFAULT_PROJECT_ID|The default project ID (get your project ID at https://console.scaleway.com/project/credentials)| |SCW_DEFAULT_REGION|The default region| |SCW_DEFAULT_ZONE|The default availability zone| |SCW_API_URL|URL of the API| diff --git a/internal/namespaces/config/commands.go b/internal/namespaces/config/commands.go index 72d70e3fcc..4553917eef 100644 --- a/internal/namespaces/config/commands.go +++ b/internal/namespaces/config/commands.go @@ -41,6 +41,7 @@ func configRoot() *core.Command { {"|", scw.ScwAccessKeyEnv, "|", "The access key of a token (create a token at https://console.scaleway.com/project/credentials)", "|"}, {"|", scw.ScwSecretKeyEnv, "|", "The secret key of a token (create a token at https://console.scaleway.com/project/credentials)", "|"}, {"|", scw.ScwDefaultOrganizationIDEnv, "|", "The default organization ID (get your organization ID at https://console.scaleway.com/project/credentials)", "|"}, + {"|", scw.ScwDefaultProjectIDEnv, "|", "The default project ID (get your project ID at https://console.scaleway.com/project/credentials)", "|"}, {"|", scw.ScwDefaultRegionEnv, "|", "The default region", "|"}, {"|", scw.ScwDefaultZoneEnv, "|", "The default availability zone", "|"}, {"|", scw.ScwAPIURLEnv, "|", "URL of the API", "|"},