Skip to content

Commit

Permalink
digitalocean: configurable base URL (#1687)
Browse files Browse the repository at this point in the history
Co-authored-by: Fernandez Ludovic <[email protected]>
  • Loading branch information
Matthieu Berthomé and ldez authored Oct 3, 2022
1 parent d5a18dc commit ca6784a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions cmd/zz_gen_cmd_dnshelp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down
1 change: 1 addition & 0 deletions docs/content/dns/zz_gen_digitalocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
6 changes: 3 additions & 3 deletions docs/content/dns/zz_gen_yandex.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ 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. -->
<!-- providers/dns/yandex/yandex.toml -->
<!-- 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-->
Expand Down Expand Up @@ -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 -->
Expand Down
3 changes: 2 additions & 1 deletion providers/dns/digitalocean/digitalocean.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const (
envNamespace = "DO_"

EnvAuthToken = envNamespace + "AUTH_TOKEN"
EnvAPIUrl = envNamespace + "API_URL"

EnvTTL = envNamespace + "TTL"
EnvPropagationTimeout = envNamespace + "PROPAGATION_TIMEOUT"
Expand All @@ -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),
Expand Down
1 change: 1 addition & 0 deletions providers/dns/digitalocean/digitalocean.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ lego --email [email protected] --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"
Expand Down

0 comments on commit ca6784a

Please sign in to comment.