From 8f349e5a5f94e26be4b42bd5032d55fbded90c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pol=C3=A1k?= Date: Sun, 9 Feb 2020 17:22:11 +0100 Subject: [PATCH] ovh: Improve provider documentation (#1057) --- docs/content/dns/zz_gen_ovh.md | 32 +++++++++++++++++++++++++++++--- providers/dns/ovh/ovh.toml | 31 ++++++++++++++++++++++++++++++- 2 files changed, 59 insertions(+), 4 deletions(-) diff --git a/docs/content/dns/zz_gen_ovh.md b/docs/content/dns/zz_gen_ovh.md index e42413a1..8be15376 100644 --- a/docs/content/dns/zz_gen_ovh.md +++ b/docs/content/dns/zz_gen_ovh.md @@ -18,9 +18,15 @@ Configuration for [OVH](https://www.ovh.com/). - Code: `ovh` -{{% notice note %}} -_Please contribute by adding a CLI example._ -{{% /notice %}} +Here is an example bash command using the OVH provider: + +```bash +OVH_APPLICATION_KEY=1234567898765432 \ +OVH_APPLICATION_SECRET=b9841238feb177a84330febba8a832089 \ +OVH_CONSUMER_KEY=256vfsd347245sdfg \ +OVH_ENDPOINT=ovh-eu \ +lego --dns autodns --domains my.domain.com --email my@email.com run +``` @@ -50,6 +56,26 @@ More information [here](/lego/dns/#configuration-and-credentials). The environment variable names can be suffixed by `_FILE` to reference a file instead of a value. More information [here](/lego/dns/#configuration-and-credentials). +## Application Key and Secret + +Application key and secret can be created by following the [OVH guide](https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/). + +When requesting the consumer key, the following configuration can be use to define access rights: + +```json +{ + "accessRules": [ + { + "method": "POST", + "path": "/domain/zone/*" + }, + { + "method": "DELETE", + "path": "/domain/zone/*" + } + ] +} +``` diff --git a/providers/dns/ovh/ovh.toml b/providers/dns/ovh/ovh.toml index 46ba81ba..3be1f47a 100644 --- a/providers/dns/ovh/ovh.toml +++ b/providers/dns/ovh/ovh.toml @@ -4,7 +4,36 @@ URL = "https://www.ovh.com/" Code = "ovh" Since = "v0.4.0" -Example = '''''' +Example = ''' +OVH_APPLICATION_KEY=1234567898765432 \ +OVH_APPLICATION_SECRET=b9841238feb177a84330febba8a832089 \ +OVH_CONSUMER_KEY=256vfsd347245sdfg \ +OVH_ENDPOINT=ovh-eu \ +lego --dns autodns --domains my.domain.com --email my@email.com run +''' + +Additional = ''' +## Application Key and Secret + +Application key and secret can be created by following the [OVH guide](https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/). + +When requesting the consumer key, the following configuration can be use to define access rights: + +```json +{ + "accessRules": [ + { + "method": "POST", + "path": "/domain/zone/*" + }, + { + "method": "DELETE", + "path": "/domain/zone/*" + } + ] +} +``` +''' [Configuration] [Configuration.Credentials]