Error (8000000) when adding pages custom domain

When I add a cf pages custom domain whether it be from the website, terraform, or api, it errors out but the custom domain shows up in the list of custom domains for the pages project. We want to manage it via terraform but this is making it not possible.

This is the error message I see if I add the custom domain from terraform
error creating domain for project “27cb28fa5af2217b7125f86936c46fab”: You have already added this custom domain. Select another custom domain or check your project configuration. (8000018)

This is what I see if I add the custom domain from the website

This is what I see if I add the custom domain from the api

  "result": null,
  "success": false,
  "errors": [
      "code": 8000000,
      "message": "An unknown error occured. Contact your account team or Cloudflare support:"
  "messages": []

This happens for all applications that we have on cloudflare pages, not just a single one.

Just to confirm, the custom domain shows in the list of custom domains for a project but doesn’t show in the terraform state?

The api call errors out. Then when I look on the website, the custom domain is added.

Same case for terraform, it errors out when adding the custom domain, but when go and look from cloudflare dashboard the domain has been added.

Same case when adding custom domain from website. It errors out when u add the custom domain but if I refresh the page the custom domain has been added

If you have the ability to open a ticket, then I would recommend doing so. Otherwise, you should make an issue on the terraform provider.

As a workaround, you should be able to import the custom domain with terraform so it stops attempting to create it.

Doesn’t look like an issue with the terraform provider. Looks like an issue that needs to be handled on cloudflare’s end. Just hitting cloudflares api with curl results in a similar error.

According to this other post, it was resolved internally

If you first attempted to add the custom domain via terraform, then it could have caused whatever state the domain ended up in.

I have escalated this issue.

Custom domains were initially added from the website where this issue was present but disregarded since the custom domain added regardless of the error.

It was when we moved to managing cloudflare resources via terraform we realized this is a problem that’ll prevent us from managing cloudflare with terraform seamlessly.


What’s the and what’s the domain you’re having issues with?


and the domain?

we are/will be using

  • and (soon)

Any updates on this? We are doing a deployment tonight and would like to know.

Any update would highly be appreciated. Thank you. We just want to know if we should postpone our deployment or ditch managing this via terraform altogether.

Can @erisa-cf help with this? It looks like she was able to resolve it here

Can anybody help with this? I’ve created a support ticket but got an email saying due to large volume of requests cloudflare is unable to help.

The escalation for this was mistakenly closed. I’ve re-opened it. I’m currently on a train so I cannot look into it myself but I passed it on to a colleague to get in front of people.

1 Like

Hi there @thrice43,

Thanks for your patience on this matter.
Our Engineering team has reviewed this but could no longer replicate, so perhaps this was a temporary issue that has hence been addressed.
Can you please confirm if you are still observing the referenced error?

Looking forward to hearing back from you.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.