Skip to content

Commit f053625

Browse files
chaosbenldez
andauthored
nicmanager: fix mode env var name and value (#2534)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
1 parent 476f9ed commit f053625

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

cmd/zz_gen_cmd_dnshelp.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/content/dns/zz_gen_nicmanager.md

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

providers/dns/nicmanager/internal/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323
// Modes.
2424
const (
2525
ModeAnycast = "anycast"
26-
ModeZone = "zone"
26+
ModeZone = "zones"
2727
)
2828

2929
// Options the Client options.

providers/dns/nicmanager/nicmanager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const (
2424
EnvEmail = envNamespace + "API_EMAIL"
2525
EnvPassword = envNamespace + "API_PASSWORD"
2626
EnvOTP = envNamespace + "API_OTP"
27-
EnvMode = envNamespace + "MODE"
27+
EnvMode = envNamespace + "API_MODE"
2828

2929
EnvTTL = envNamespace + "TTL"
3030
EnvPropagationTimeout = envNamespace + "PROPAGATION_TIMEOUT"
@@ -85,7 +85,7 @@ func NewDNSProvider() (*DNSProvider, error) {
8585
config := NewDefaultConfig()
8686
config.Password = values[EnvPassword]
8787

88-
config.Mode = env.GetOrDefaultString(EnvMode, internal.ModeAnycast)
88+
config.Mode = env.GetOneWithFallback(EnvMode, internal.ModeAnycast, env.ParseString, envNamespace+"MODE")
8989
config.Username = env.GetOrFile(EnvUsername)
9090
config.Login = env.GetOrFile(EnvLogin)
9191
config.Email = env.GetOrFile(EnvEmail)

providers/dns/nicmanager/nicmanager.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Additional = '''
3131
## Description
3232
3333
You can log in using your account name + username or using your email address.
34-
Optionally if TOTP is configured for your account, set `NICMANAGER_API_OTP`.
34+
Optionally, if TOTP is configured for your account, set `NICMANAGER_API_OTP`.
3535
'''
3636

3737
[Configuration]
@@ -42,7 +42,7 @@ Optionally if TOTP is configured for your account, set `NICMANAGER_API_OTP`.
4242
NICMANAGER_API_PASSWORD = "Password, always required"
4343
[Configuration.Additional]
4444
NICMANAGER_API_OTP = "TOTP Secret (optional)"
45-
NICMANAGER_API_MODE = "mode: 'anycast' or 'zone' (default: 'anycast')"
45+
NICMANAGER_API_MODE = "mode: 'anycast' or 'zones' (for FreeDNS) (default: 'anycast')"
4646
NICMANAGER_POLLING_INTERVAL = "Time between DNS propagation check in seconds (Default: 2)"
4747
NICMANAGER_PROPAGATION_TIMEOUT = "Maximum waiting time for DNS propagation in seconds (Default: 300)"
4848
NICMANAGER_TTL = "The TTL of the TXT record used for the DNS challenge in seconds (Default: 900)"

0 commit comments

Comments
 (0)