Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the credentials used for the provider #75

Merged
merged 4 commits into from
Jul 8, 2018
Merged
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
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