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

Improve readme (generation of keys) #181

Merged
merged 1 commit into from
Mar 3, 2021
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
33 changes: 14 additions & 19 deletions website/docs/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,21 @@ description: |-

# OVH Provider

The OVH provider is used to interact with the
many resources supported by OVH. The provider needs to be configured
with the proper credentials before it can be used.
The OVH provider is used to interact with the many resources supported by OVH.
The provider needs to be configured with the proper credentials before it can be used.

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

## Configuration of the provider

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.
Requests to OVH APIs require a set of secrets keys and the definition of the API end point.
See [First Steps with the API](https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/) (or the French version, [Premiers pas avec les API OVHcloud](https://docs.ovh.com/fr/api/api-premiers-pas/)) for a detailed explanation.

It is recommend to install [ovh-cli](https://github.com/ovh/ovh-cli) to handle and manage all your secret keys.
Besides the API end-point, the required keys are the `application_key`, the `application_secret`, and the `consumer_key`.
These keys can be generated via the [OVH token generation page](https://api.ovh.com/createToken/?GET=/*&POST=/*&PUT=/*&DELETE=/*).

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).
These parameters can be configured directly in the provider block as shown hereafter.

Then, you can just declare a minimal configuration of the OVH provider:

```hcl
# Configure the OVH Provider
provider "ovh" {
endpoint = "ovh-eu"
}
```
Secret keys `endpoint`, `application_key`, `application_secret` or
`consumer_key` will be fetched from the `~/.ovh.conf` file.

Or you can declare them in provider configuration:

```hcl
# Configure the OVH Provider
Expand All @@ -45,7 +34,13 @@ provider "ovh" {
}
```

Or let the provider fetching them from your environment (see "[Configuration reference](#configuration-reference)").
Alternatively the secret keys can be retrieved from your environment.

* `OVH_APPLICATION_KEY`
* `OVH_APPLICATION_SECRET`
* `OVH_CONSUMER_KEY`

This later method (or a similar alternative) is recommended to avoid storing secret data in a source repository.


## Example Usage
Expand Down