diff --git a/docs/testing-txt-records.md b/docs/testing-txt-records.md index b2c0c1808..542b1eef6 100644 --- a/docs/testing-txt-records.md +++ b/docs/testing-txt-records.md @@ -61,7 +61,7 @@ When you do a `dnscontrol preview`, you should see changes for t1 and t2. ``` If you don't see those changes, that's a bug. For example, we found that -Cloudflare leave t2 alone but would try to add double-quotes to t3! This was +Cloudflare left t2 alone but would try to add double-quotes to t3! This was fixed in https://github.com/StackExchange/dnscontrol/pull/1543. Step 3: Push diff --git a/providers/cloudflare/cloudflareProvider.go b/providers/cloudflare/cloudflareProvider.go index ad9ba7db8..d9761f0f6 100644 --- a/providers/cloudflare/cloudflareProvider.go +++ b/providers/cloudflare/cloudflareProvider.go @@ -63,7 +63,7 @@ func init() { // cloudflareProvider is the handle for API calls. type cloudflareProvider struct { - domainIndex map[string]string + domainIndex map[string]string // Call c.fetchDomainList() to populate before use. nameservers map[string][]string ipConversions []transform.IPConversion ignoredLabels []string @@ -708,6 +708,11 @@ func getProxyMetadata(r *models.RecordConfig) map[string]string { // EnsureDomainExists returns an error of domain does not exist. func (c *cloudflareProvider) EnsureDomainExists(domain string) error { + if c.domainIndex == nil { + if err := c.fetchDomainList(); err != nil { + return err + } + } if _, ok := c.domainIndex[domain]; ok { return nil } diff --git a/providers/cscglobal/api.go b/providers/cscglobal/api.go index 50a7d3ccf..2cfceebe0 100644 --- a/providers/cscglobal/api.go +++ b/providers/cscglobal/api.go @@ -326,7 +326,7 @@ func (client *providerClient) getDomains() ([]string, error) { json.Unmarshal(bodyString, &dr) if dr.Meta.Pages > 1 { - return nil, fmt.Errorf("cscglobal getDomains: unimplemented paganation") + return nil, fmt.Errorf("cscglobal getDomains: unimplemented paganation") } var r []string @@ -483,7 +483,7 @@ func (client *providerClient) clearRequests(domain string) error { } } switch ze.Status { - case "PROPAGATING": + case "NEW", "SUBMITTED", "PROCESSING", "PROPAGATING": printer.Printf("INFO: Waiting for id=%s status=%s\n", ze.ID, ze.Status) client.waitRequest(ze.ID) case "FAILED":