Skip to content

Commit

Permalink
Corrected example code, cleared up token confusion (#12177)
Browse files Browse the repository at this point in the history
The adjustment was made after I spent a few minutes scratching my head, I have done the following: 

* Updated the 'provider' block in the first example code to be 'token' instead of 'access_key' - Didn't work previously. 
* Clarified locations of both 'access_key' and 'token' within the Scaleway panel, and appropriate naming.
* Removed "empty" section in example block at the bottom, as this fails with an error when attempted.

Overall I think this increases readability. I have tested this against my own Scaleway account.
  • Loading branch information
Terrafoundry Ltd authored and stack72 committed Feb 22, 2017
1 parent 210474a commit 79c4935
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions website/source/docs/providers/scaleway/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 = ""
access_key = ""
organization = "<YOUR-ACCESS-KEY>"
 token = "<YOUR-GENERATED-TOKEN>"
region = "par1"
}
Expand Down Expand Up @@ -75,22 +75,27 @@ resource "scaleway_security_group_rule" "https_accept" {
}
```

You'll need to provide your Scaleway organization access key
(available in Scaleway panel in *Credentials > Tokens > access key*)
and token (you can generate it in the same section), so that Terraform can connect.
If you don't want to put credentials in your configuration file,
You'll need to provide your Scaleway organization **access key** and **token**.

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 **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.

If you do not want to put credentials in your configuration file,
you can leave them out:

```
provider "scaleway" {
organization = ""
token = ""
region = "par1"
}
```

...and instead set these environment variables:

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

0 comments on commit 79c4935

Please sign in to comment.