StackExchange / dnscontrol

Infrastructure as code for DNS!
https://dnscontrol.org/
MIT License
3.07k stars 389 forks source link

FEATURE: Maintain CLOUDFLARE comments and tags via DNSControl #1862

Open mrtristan opened 1 year ago

mrtristan commented 1 year ago

So cloudflare just announced a new set of features around tagging and commenting on DNS records. https://blog.cloudflare.com/dns-record-comments/

Any thoughts on if this will be exposed via dnscontrol? We currently use dnscontrol for our workflow and i find myself adding comments in the config file that powers the thousands of records we have across our domains. Would be rather empowering for these comments and such to make their way through to cloudflare.

Would just like a ruling on if it can be an expected feature. I understand if not because it's special to them but figured it wouldn't be the first thing you've had special for them (ie proxying).

tlimoncelli commented 1 year ago

It should be possible. We already have meta parameters like the proxy on/off.

The catch is that if we added this feature, people that were already have comments (in the portal, but not in dnsconfig.js) would see those comments/tags being deleted. dnscontrol can't tell the difference between something that was added manually and something that was deleted from dnsconfig.js. Therefore, for backwards compatibility it would need to be an opt-in feature, kind of like what we did with manage_redirects and manage_workers so that we don't accidentally remove existing redirects and workers.

CC @tresni (maintainer of the cloudflare provider)

hmoffatt commented 1 year ago

I tried to take a look at this, but tags weren't added to cloudflare-go until version 0.58.0 (dnscontrol is on 0.55.0 currently), and that has many other breaking changes to workers (in 0.57.0) and DNSRecord (0.58.0).

The latest is 0.67.0 though.

tlimoncelli commented 1 year ago

Ah, good point. Are you interested in upgrading to the latest library? It would be greatly appreciated as it will unblock this and other feature requests.

hmoffatt commented 1 year ago

I've made a start. We'll see how it goes.

Testing the tags/comments will be tricky, as it requires a zone on a paid plan, but the integration tests appear to be destructive if I'm not mistake.

tresni commented 1 year ago

Just a note that comments are actually available on Free plans, tags are restricted to paid accounts (which I don't have.)

See https://developers.cloudflare.com/dns/manage-dns-records/reference/record-attributes/#availability

hmoffatt commented 1 year ago

Oh yep, https://developers.cloudflare.com/dns/manage-dns-records/reference/record-attributes/

mikemartin1090 commented 11 months ago

Hi all - I am also super interested in enabling tags/comments for my Cloudflare records. I appreciate you, @hmoffatt for upgrading the cloudflare-go library!! Has there been any movement on this issue now that the Go library has been updated?

JulienWeintraub commented 5 months ago

Hello, we'd be delighted to have this feature too (especially the comments) ❤️ As a reminder of the last message from @mikemartin1090, is there any progress on that topic ?

Thanks 🙏

linlinas commented 5 months ago

+1 we look forward for this feature