Skip to content

nicmanager: fix mode env var name and value #2534

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

Merged
merged 3 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion cmd/zz_gen_cmd_dnshelp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/content/dns/zz_gen_nicmanager.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion providers/dns/nicmanager/internal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const (
// Modes.
const (
ModeAnycast = "anycast"
ModeZone = "zone"
ModeZone = "zones"
)

// Options the Client options.
Expand Down
4 changes: 2 additions & 2 deletions providers/dns/nicmanager/nicmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (
EnvEmail = envNamespace + "API_EMAIL"
EnvPassword = envNamespace + "API_PASSWORD"
EnvOTP = envNamespace + "API_OTP"
EnvMode = envNamespace + "MODE"
EnvMode = envNamespace + "API_MODE"

EnvTTL = envNamespace + "TTL"
EnvPropagationTimeout = envNamespace + "PROPAGATION_TIMEOUT"
Expand Down Expand Up @@ -85,7 +85,7 @@ func NewDNSProvider() (*DNSProvider, error) {
config := NewDefaultConfig()
config.Password = values[EnvPassword]

config.Mode = env.GetOrDefaultString(EnvMode, internal.ModeAnycast)
config.Mode = env.GetOneWithFallback(EnvMode, internal.ModeAnycast, env.ParseString, envNamespace+"MODE")
config.Username = env.GetOrFile(EnvUsername)
config.Login = env.GetOrFile(EnvLogin)
config.Email = env.GetOrFile(EnvEmail)
Expand Down
4 changes: 2 additions & 2 deletions providers/dns/nicmanager/nicmanager.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Additional = '''
## Description
You can log in using your account name + username or using your email address.
Optionally if TOTP is configured for your account, set `NICMANAGER_API_OTP`.
Optionally, if TOTP is configured for your account, set `NICMANAGER_API_OTP`.
'''

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