Fix log message if a cloudflare update fails

If a Cloudflare DNS record update fails, the log erroneously claimed
that it failed to delete the record. This fixes the log to claim that
it failed to update the record.

Signed-off-by: Ari Becker <ari-becker@users.noreply.github.com>
This commit is contained in:
Ari Becker 2021-10-12 15:56:10 +03:00
parent 3676ea0b79
commit 6c607b64e4
No known key found for this signature in database
GPG Key ID: E9D19CF363248392

View File

@ -308,7 +308,7 @@ func (p *CloudFlareProvider) submitChanges(ctx context.Context, changes []*cloud
}
err := p.Client.UpdateDNSRecord(zoneID, recordID, change.ResourceRecord)
if err != nil {
log.WithFields(logFields).Errorf("failed to delete record: %v", err)
log.WithFields(logFields).Errorf("failed to update record: %v", err)
}
} else if change.Action == cloudFlareDelete {
recordID := p.getRecordID(records, change.ResourceRecord)