Skip to content

Conversation

@anolek
Copy link
Contributor

@anolek anolek commented Dec 26, 2025

Hello,

This pull request add the GeoDNS feature for ClouDNS.
Their API has 2 fields for adding a location, I choose to use only "geodns-code" because it is more user-friendly.
Following the advice from @tlimoncelli the new metadata name is cloudns_geodns_code

// Example syntax using geodns-code instead of geodns-location
A("test", "1.2.3.4", {cloudns_geodns_code: "US"});
A("test", "1.2.3.4", {cloudns_geodns_code: "FR"});
A("test", "1.2.3.4", {cloudns_geodns_code: "PL"});

More tests have been added and they all pass!

To compare two records, i have to replace the value "DEFAULT" with an empty string temporary.
Their API always return "DEFAULT" as value by default instead of an empty string for any dns record which uses their geodns feature.

// API return something like this if your account has GeoDNS and the dns record has GeoDNS
{"id":"XXXX","type":"A","host":"","record":"1.2.3.7","dynamicurl_status":0,"failover":"0","ttl":"300","geodns-location":"2","geodns-location-name":"Africa","geodns-location-code":"AFR","status":1}
// API return something like this if your account doesn't have GeoDNS feature or the dns record is not compatible with their GeoDNS
{"id":"XXXX","type":"TXT","host":"","record":"test","failover":"0","ttl":"3600","status":1}

If this implementation is good enough, i will update the documentation ("ClouDNS > Metadata section")

@cafferata
Copy link
Collaborator

Ping @pragmaton, the maintainer of the Cloud DNS provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants