Skip to content

Commit

Permalink
volcengine: set API information within the default configuration (#2308)
Browse files Browse the repository at this point in the history
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
  • Loading branch information
liuruibin and ldez authored Oct 21, 2024
1 parent d6c1ed9 commit 6051473
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions providers/dns/volcengine/volcengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ type Config struct {
// NewDefaultConfig returns a default configuration for the DNSProvider.
func NewDefaultConfig() *Config {
return &Config{
Scheme: env.GetOrDefaultString(EnvScheme, "https"),
Host: env.GetOrDefaultString(EnvHost, "open.volcengineapi.com"),
Region: env.GetOrDefaultString(EnvRegion, volc.DefaultRegion),

TTL: env.GetOrDefaultInt(EnvTTL, defaultTTL),
PropagationTimeout: env.GetOrDefaultSecond(EnvPropagationTimeout, 240*time.Second),
PollingInterval: env.GetOrDefaultSecond(EnvPollingInterval, 10*time.Second),
Expand Down Expand Up @@ -81,9 +85,6 @@ func NewDNSProvider() (*DNSProvider, error) {
config := NewDefaultConfig()
config.AccessKey = values[EnvAccessKey]
config.SecretKey = values[EnvSecretKey]
config.Scheme = env.GetOrDefaultString(EnvScheme, "https")
config.Host = env.GetOrDefaultString(EnvHost, "open.volcengineapi.com")
config.Region = env.GetOrDefaultString(EnvRegion, volc.DefaultRegion)

return NewDNSProviderConfig(config)
}
Expand Down

0 comments on commit 6051473

Please sign in to comment.