digitalocean: configurable base URL (#1687)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
Matthieu Berthomé 2022-10-03 15:36:47 +02:00 committed by GitHub
parent d5a18dc2d5
commit ca6784a824
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 4 deletions

View file

@ -561,6 +561,7 @@ func displayDNSHelp(name string) error {
ew.writeln()
ew.writeln(`Additional Configuration:`)
ew.writeln(` - "DO_API_URL": The URL of the API`)
ew.writeln(` - "DO_HTTP_TIMEOUT": API request timeout`)
ew.writeln(` - "DO_POLLING_INTERVAL": Time between DNS propagation check`)
ew.writeln(` - "DO_PROPAGATION_TIMEOUT": Maximum waiting time for DNS propagation`)

View file

@ -47,6 +47,7 @@ More information [here]({{< ref "dns#configuration-and-credentials" >}}).
| Environment Variable Name | Description |
|--------------------------------|-------------|
| `DO_API_URL` | The URL of the API |
| `DO_HTTP_TIMEOUT` | API request timeout |
| `DO_POLLING_INTERVAL` | Time between DNS propagation check |
| `DO_PROPAGATION_TIMEOUT` | Maximum waiting time for DNS propagation |

View file

@ -6,7 +6,7 @@ slug: yandex
dnsprovider:
since: "v3.7.0"
code: "yandex"
url: "https://yandex.com/"
url: "https://pdd.yandex.com"
---
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
@ -14,7 +14,7 @@ dnsprovider:
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
Configuration for [Yandex PDD](https://yandex.com/).
Configuration for [Yandex PDD](https://pdd.yandex.com).
<!--more-->
@ -60,7 +60,7 @@ More information [here]({{< ref "dns#configuration-and-credentials" >}}).
## More information
- [API documentation](https://tech.yandex.com/domain/doc/concepts/api-dns-docpage/)
- [API documentation](https://yandex.com/dev/domain/doc/concepts/api-dns.html)
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
<!-- providers/dns/yandex/yandex.toml -->

View file

@ -17,6 +17,7 @@ const (
envNamespace = "DO_"
EnvAuthToken = envNamespace + "AUTH_TOKEN"
EnvAPIUrl = envNamespace + "API_URL"
EnvTTL = envNamespace + "TTL"
EnvPropagationTimeout = envNamespace + "PROPAGATION_TIMEOUT"
@ -37,7 +38,7 @@ type Config struct {
// NewDefaultConfig returns a default configuration for the DNSProvider.
func NewDefaultConfig() *Config {
return &Config{
BaseURL: defaultBaseURL,
BaseURL: env.GetOrDefaultString(EnvAPIUrl, defaultBaseURL),
TTL: env.GetOrDefaultInt(EnvTTL, 30),
PropagationTimeout: env.GetOrDefaultSecond(EnvPropagationTimeout, 60*time.Second),
PollingInterval: env.GetOrDefaultSecond(EnvPollingInterval, 5*time.Second),

View file

@ -13,6 +13,7 @@ lego --email you@example.com --dns digitalocean --domains my.example.org run
[Configuration.Credentials]
DO_AUTH_TOKEN = "Authentication token"
[Configuration.Additional]
DO_API_URL = "The URL of the API"
DO_POLLING_INTERVAL = "Time between DNS propagation check"
DO_PROPAGATION_TIMEOUT = "Maximum waiting time for DNS propagation"
DO_TTL = "The TTL of the TXT record used for the DNS challenge"