Extended API Response Times (and Nil responses) from Terraform

We’re moving our company’s DNS to Cloudflare and are doing so by defining all of our records and zones in Terraform.

We have over 700 records to implement we’re seeing huge times from CF APIs to respond (well over 30 seconds if they don’t time out) and keep receiving errors such as could not read response body: %!w(<nil>) which I presume is the API rate limit and what appears to be a race condition of sorts: expected DNS record to not already be present but already exists.

Weirdly, we’re not getting responses from CF it seems, however assets are being created and are present in the user portal. Is this an issue with the CF API?

I’m sorry that I don’t answer your exact question, however:

700 records can fit in just a few file splits.

Download the domain zone file from your DNS, split it in 4 (200, 200, 200 and 100) and upload them.