1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

CLOUDFLARE: Stop requiring accountname (#1280)

There is no API call I've found that requires it, only the accountID.  Also, we now set the cfClient.AccountID similar to b55278140f (h/t @fdcastel) and no longer store duplicate information in the cfClient and api objects.

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Brian Hartvigsen
2021-10-03 14:40:50 -06:00
committed by GitHub
parent 413d5a15c3
commit d08a8f6c4e
3 changed files with 8 additions and 17 deletions

View File

@@ -56,7 +56,7 @@ func (c *cloudflareProvider) deleteRec(rec cloudflare.DNSRecord, domainID string
}
func (c *cloudflareProvider) createZone(domainName string) (string, error) {
zone, err := c.cfClient.CreateZone(context.Background(), domainName, false, cloudflare.Account{Name: c.AccountName, ID: c.AccountID}, "full")
zone, err := c.cfClient.CreateZone(context.Background(), domainName, false, cloudflare.Account{ID: c.cfClient.AccountID}, "full")
return zone.ID, err
}