│ Error: Authentication error (10000) with cloudflare_record

When I try to update DNS record using cloudflare API token using terraform of this account then it’s returning 10000 error code.
Im trying with api_key Global API Key and api_token (Zone.Zone, Zone.DNS, Zone.Zone Settings), the same result:
│ Error: Authentication error (10000)

│ with cloudflare_record.

cloudflare = {
  source = "cloudflare/cloudflare"
  version = "~>3.0"
} 

and v4.28

Token valid and working on externalDNS service.

curl --request POST
–url https://api.cloudflare.com/client/v4/zones/<zone_id>/dns_records
–header ‘Content-Type: application/json’
–header ‘X-Auth-Email: ’ --header ‘X-Auth-Key: ’
–data ‘{
“content”: “198.51.100.4”,
“name”: “example.com”,
“proxied”: false,
“type”: “A”,
“comment”: “Domain verification record”,
“ttl”: 3600
}’

“success”:true,“errors”:,“messages”:

But
│ Error: Authentication error (10000)

│ with cloudflare_record
when using the same mail, zone and global api key

But
│ Error: Authentication error (10000)

│ with cloudflare_record
when using the same zone_id, mail, key.

Are you the superadmin on the account @multihub?

Yep, tnx for answer. I found the problem.
Аfter moving from one CF account to another, the old zone id remained in tf state, which tf could not change. After manual changes everything worked.

1 Like

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