Skip to content

Commit c23c350

Browse files
authored
Merge pull request #26 from dlecan/patch-1
Improve initial description of OVH provider setup
2 parents bd61794 + cdcb893 commit c23c350

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

website/docs/index.html.markdown

+27-5
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,49 @@ with the proper credentials before it can be used.
1414

1515
Use the navigation to the left to read about the available resources.
1616

17-
## Example Usage
17+
## Configuration of the provider
18+
19+
Requests to OVH APIs need to configure secrets keys in the provider, either fetching them from `~/.ovh.conf` file, in configuration of OVH provider or from your environment.
20+
21+
It is recommend to install [ovh-cli](https://github.com/ovh/ovh-cli) to handle and manage all your secret keys.
22+
23+
Follow [installation](https://github.com/ovh/ovh-cli#installation) then [setup](https://github.com/ovh/ovh-cli#getting-started) steps of ovh-cli to initialize your environment (secret keys and `~/.ovh.conf` file).
24+
25+
Then, you can just declare a minimal configuration of the OVH provider:
1826

27+
```hcl
28+
# Configure the OVH Provider
29+
provider "ovh" {
30+
endpoint = "ovh-eu"
31+
}
1932
```
33+
Secret keys `endpoint`, `application_key`, `application_secret` or
34+
`consumer_key` will be fetched from the `~/.ovh.conf` file.
35+
36+
Or you can declare them in provider configuration:
37+
38+
```hcl
2039
# Configure the OVH Provider
2140
provider "ovh" {
2241
endpoint = "ovh-eu"
2342
application_key = "yyyyyy"
2443
application_secret = "xxxxxxxxxxxxxx"
2544
consumer_key = "zzzzzzzzzzzzzz"
2645
}
46+
```
47+
48+
Or let the provider fetching them from your environment (see "[Configuration reference](#configuration-reference)").
49+
2750

51+
## Example Usage
52+
53+
```
2854
# Create a public cloud user
2955
resource "ovh_publiccloud_user" "user-test" {
3056
# ...
3157
}
3258
```
3359

34-
If you don't provide `endpoint`, `application_key`, `application_secret` or
35-
`consumer_key`, the provider will try to fetch them from the ~/.ovh.conf file
36-
generated by ovh-cli, or from your environment (see below).
37-
3860
## Configuration Reference
3961

4062
The following arguments are supported:

0 commit comments

Comments
 (0)