oraclecloud: use fqdn to resolve zone (#1731)

This commit is contained in:
Omar Aloraini 2022-10-10 08:05:11 +03:00 committed by GitHub
parent 615e601d78
commit 87ee39a1dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,7 +105,7 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
func (d *DNSProvider) Present(domain, token, keyAuth string) error { func (d *DNSProvider) Present(domain, token, keyAuth string) error {
fqdn, value := dns01.GetRecord(domain, keyAuth) fqdn, value := dns01.GetRecord(domain, keyAuth)
zoneNameOrID, err1 := dns01.FindZoneByFqdn(dns01.ToFqdn(domain)) zoneNameOrID, err1 := dns01.FindZoneByFqdn(fqdn)
if err1 != nil { if err1 != nil {
return fmt.Errorf("oraclecloud: could not find zone for domain %q and fqdn %q : %w", domain, fqdn, err1) return fmt.Errorf("oraclecloud: could not find zone for domain %q and fqdn %q : %w", domain, fqdn, err1)
} }
@ -140,7 +140,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error { func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
fqdn, value := dns01.GetRecord(domain, keyAuth) fqdn, value := dns01.GetRecord(domain, keyAuth)
zoneNameOrID, err1 := dns01.FindZoneByFqdn(dns01.ToFqdn(domain)) zoneNameOrID, err1 := dns01.FindZoneByFqdn(fqdn)
if err1 != nil { if err1 != nil {
return fmt.Errorf("oraclecloud: could not find zone for domain %q and fqdn %q : %w", domain, fqdn, err1) return fmt.Errorf("oraclecloud: could not find zone for domain %q and fqdn %q : %w", domain, fqdn, err1)
} }