Corrected example code, cleared up token confusion (#12177)
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.
This commit is contained in:
parent
210474a2a5
commit
79c4935604
|
@ -23,8 +23,8 @@ Here is an example that will setup the following:
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
provider "scaleway" {
|
provider "scaleway" {
|
||||||
organization = ""
|
organization = "<YOUR-ACCESS-KEY>"
|
||||||
access_key = ""
|
token = "<YOUR-GENERATED-TOKEN>"
|
||||||
region = "par1"
|
region = "par1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,16 +75,21 @@ resource "scaleway_security_group_rule" "https_accept" {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
You'll need to provide your Scaleway organization access key
|
You'll need to provide your Scaleway organization **access key** and **token**.
|
||||||
(available in Scaleway panel in *Credentials > Tokens > access key*)
|
|
||||||
and token (you can generate it in the same section), so that Terraform can connect.
|
Your access key can be found on your Scaleway control panel, in the *Credentials*
|
||||||
If you don't want to put credentials in your configuration file,
|
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:
|
you can leave them out:
|
||||||
|
|
||||||
```
|
```
|
||||||
provider "scaleway" {
|
provider "scaleway" {
|
||||||
organization = ""
|
|
||||||
token = ""
|
|
||||||
region = "par1"
|
region = "par1"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -92,5 +97,5 @@ provider "scaleway" {
|
||||||
...and instead set these environment variables:
|
...and instead set these environment variables:
|
||||||
|
|
||||||
- **SCALEWAY_ORGANIZATION**: Your Scaleway `organization` access key
|
- **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
|
- **SCALEWAY_REGION**: The Scaleway region
|
||||||
|
|
Loading…
Reference in New Issue