Final changes before V3.0.0 release * Remove old Gandi. Fixes #575 * Many cleanups * go mod tidy && go mod vendor * integration_test.go: Output subtest name * Cleanups * integration_test.go: Description should include sub-test name * Add a whitespace test to js/parse_tests/017-txt.js * Cloudflare strips whitespace from end of TXT * Fixes https://github.com/StackExchange/dnscontrol/issues/700 * Whitespace at end of TXT records Name.com strips the whitespace from the end of a TXT record. There's nothing we can do other than file a bug. * Fixes https://github.com/StackExchange/dnscontrol/issues/701
2.5 KiB
name | title | layout | jsId |
---|---|---|---|
Gandi_v5 | Gandi_v5 Provider | default | GANDI_V5 |
Gandi_v5 Provider
GANDI_V5
uses the v5 API and can act as a registrar provider
or a DNS provider. It is only able to work with domains
migrated to the new LiveDNS API, which should be all domains.
API keys are assigned to particular users. Go to User Settings,
"Manage the user account and security settings", the "Security"
tab, then regenerate the "Production API key".
- API Documentation: https://api.gandi.net/docs
- API Endpoint: https://api.gandi.net/
Configuration
In your credentials file you must provide your Gandi.net API key. The sharing_id is optional.
The sharing_id
selects between different organizations which your account is
a member of; to manage domains in multiple organizations, you can use multiple
creds.json
entries. The first parameter to NewDnsProvider
is the key to
use in creds.json
, and you can register multiple configured providers on the
same backend "GANDI_V5"
provider.
(NB: in practice, this doesn't appear to be necessary and sharing_id
is not
enforced?)
{% highlight json %} { "gandi": { "apikey": "your-gandi-key", "sharing_id": "your-sharing_id" } } {% endhighlight %}
Metadata
This provider does not recognize any special metadata fields unique to Gandi.
Limitations
This provider does not support using ALIAS
in combination with DNSSEC,
whether AUTODNSSEC
or otherwise.
This provider only supports ALIAS
on the "@"
zone apex, not on any other
names.
Usage
Example Javascript:
{% highlight js %} var GANDI = NewDnsProvider("gandi", "GANDI_V5"); var REG_GANDI = NewRegistrar("gandi", "GANDI_V5");
D("example.tld", REG_GANDI, DnsProvider(GANDI), A("test","1.2.3.4") ); {% endhighlight %}
If you are converting from the old "GANDI" provider,
simply change "GANDI" to "GANDI_V5" in dnsconfig.js
.
Be sure to test with dnscontrol preview
before running dnscontrol push
.
New domains
If a domain does not exist in your Gandi account, DNSControl will not automatically add it with the create-domains
command. You'll need to do that via the web UI manually.
Common errors
This is the error you'll see if your API key is invalid.
Error getting corrections: 401: The server could not verify that you authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad api key), or your access token has expired