Skip to content

Commit

Permalink
Merge pull request #75 from eallrich/clarify-api-credentials
Browse files Browse the repository at this point in the history
Clarify the credentials used for the provider
  • Loading branch information
nicolai86 authored Jul 8, 2018
2 parents 0a7d761 + b443389 commit bb2ecd3
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions website/docs/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Here is an example that will setup the following:

```hcl
provider "scaleway" {
organization = "<YOUR-ACCESS-KEY>"
token = "<YOUR-GENERATED-TOKEN>"
organization = "<YOUR-ORGANIZATION-ID>"
token = "<YOUR-SECRET-TOKEN>"
region = "par1"
}
Expand Down Expand Up @@ -75,15 +75,22 @@ resource "scaleway_security_group_rule" "https_accept" {
}
```

You'll need to provide your Scaleway organization **access key** and **token**.
You'll need to provide your Scaleway **organization ID** and a **secret token**. Both are
UUIDs.

Your access key can be found on your Scaleway control panel, in the *Credentials*
tab of the management panes. It is under the *Tokens* subsection, but is labelled
seperately as **access key**.
Your **organization ID** can be found in the *Account* tab of the Scaleway control panel. It
is labeled "Organization ID". Alternatively, if you already have a **secret token** you can
issue a request to the Scaleway API directly and query for your **organization ID**:
```shell
$ curl https://account.scaleway.com/organizations -H "X-Auth-Token: <YOUR-SECRET-TOKEN>"
```

Your **token** can be generated by selecting to "Create new token" under the same
subsection as above. This does not require further input, but giving each token a
friendly-name is suggested.
A **secret token** can be generated by visiting the *Credentials* tab of the Scaleway
control panel and looking in the *Tokens* section at the bottom of the page. Each listed
"Secret Key" (if any tokens have already been created) can be used as your **secret token**.
Since secret keys are only revealed one time (when the token is first created) you might
need to create a new token to get a new "Secret Key". Giving each token a friendly-name
is recommended.

If you do not want to put credentials in your configuration file,
you can leave them out:
Expand All @@ -96,7 +103,7 @@ provider "scaleway" {

...and instead set these environment variables:

- **SCALEWAY_ORGANIZATION**: Your Scaleway `organization` access key
- **SCALEWAY_ORGANIZATION**: Your Scaleway `organization` ID
- **SCALEWAY_TOKEN**: Your API access `token`, generated by you
- **SCALEWAY_REGION**: The Scaleway region

Expand Down

0 comments on commit bb2ecd3

Please sign in to comment.