I've currently had the same issue while configuring my GCP Cloud DNS domain.
The error is very generic and not super clear. However, I found an issue on GitHub at kubernetes-sigs/external-dns with the title "Google-CloudDNS: Unable to write CNAME record when txt registry is enabled." which made it a bit clear what other record could be causing the issue.
Google's DNS error message documentation mention that SOA
and NS
would be conflicting with CNAME
:
cnameResourceRecordSetConflict
The resource record set entity.change.additions[XX]
is invalid because the DNS name example.com might have either one CNAME resource record set or resource record sets of other types, but not both.
This error occurs when you create two types of resource record sets, such as both an A record and a CNAME record for the same DNS name. A common cause of this error is trying to create a CNAME record at the zone apex. This is not possible because it would conflict with the required SOA and NS records of the same name.
Recommended action: Pick one or the other.
However, it doesn't feel right as both SOA
, and NS
records are added automatically when creating a Cloud DNS service.
Looking back to my Cloud DNS, I found two TXT
records I added for validation of property with Google, and once I removed the TXT
records, I was able to add the CNAME
record.
I hope it helps future developers.