Updating root record fails when a CAA record type exists for the domain
If i have example.com, i have an A record for that in cloudflares DNS which is called example.com I then set up a CAA record type which has the same name, example.com, with a value i.e. 0 issue "letsencrypt.org"
When the script runs, using the below invocation, it tries to update the CAA record. Update-CloudFlareDynamicDns -token TOKEN -Email [email protected] -zone example.com
As a workaround, i appended "-record example.com" to the above command, which initially created a duplicate DNS record for the root domain, but once i had deleted both and reran the amended invocation, below, it seems to function correctly. Update-CloudFlareDynamicDns -token TOKEN -Email [email protected] -zone example.com -record example.com While this does run, given -record is specified, the console output will say updating example.com.example.com.
I'd call it an edge case, given the number of sites currently using CAA, however it may be worth fixing correctly. Maybe ignoring CAA record types unless -type CAA is called? I wouldn't hold your breath on a PR from me, though i will give it a go.
It turns out my workaround was not, merely procrastination ramblings whilst at work. PR simply restricts the type of record it pulls upon intial query. #5