infomaniak: CNAME support (#1790)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
parent
339b62fdcd
commit
a824cab316
1 changed files with 3 additions and 4 deletions
|
@ -112,10 +112,9 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
|
|||
func (d *DNSProvider) Present(domain, token, keyAuth string) error {
|
||||
fqdn, value := dns01.GetRecord(domain, keyAuth)
|
||||
|
||||
// TODO(ldez) replace domain by FQDN to follow CNAME.
|
||||
ikDomain, err := d.client.GetDomainByName(domain)
|
||||
ikDomain, err := d.client.GetDomainByName(dns01.UnFqdn(fqdn))
|
||||
if err != nil {
|
||||
return fmt.Errorf("infomaniak: could not get domain %q: %w", domain, err)
|
||||
return fmt.Errorf("infomaniak: could not get domain %q: %w", fqdn, err)
|
||||
}
|
||||
|
||||
d.domainIDsMu.Lock()
|
||||
|
@ -168,7 +167,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
|
|||
|
||||
err := d.client.DeleteDNSRecord(domainID, recordID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("infomaniak: could not delete record %q: %w", domain, err)
|
||||
return fmt.Errorf("infomaniak: could not delete record %q: %w", dns01.UnFqdn(fqdn), err)
|
||||
}
|
||||
|
||||
// Delete record ID from map
|
||||
|
|
Loading…
Reference in a new issue