Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/commands/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ 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_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|
Expand Down
2 changes: 1 addition & 1 deletion internal/core/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "" {
Expand Down
2 changes: 1 addition & 1 deletion internal/core/command_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
7 changes: 4 additions & 3 deletions internal/namespaces/config/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ 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.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", "|"},
Expand Down