dnscontrol/documentation/providers/powerdns.md
Jan-Philipp Benecke 1d252dd482
POWERDNS: Add option to set the PowerDNS zone kind (#2274)
Signed-off-by: Jan-Philipp Benecke <jan-philipp@bnck.me>
2023-04-24 17:16:23 -05:00

1.6 KiB

Configuration

To use this provider, add an entry to creds.json with TYPE set to POWERDNS along with your API URL, API Key and Server ID. In most cases the Server id is localhost.

Example:

{% code title="creds.json" %}

{
  "powerdns": {
    "TYPE": "POWERDNS",
    "apiKey": "your-key",
    "apiUrl": "http://localhost",
    "serverName": "localhost"
  }
}

{% endcode %}

Metadata

Following metadata are available:

{% code title="dnsconfig.js" %}

{
    'default_ns': [
        'a.example.com.',
        'b.example.com.'
    ],
    'dnssec_on_create': false,
    'zone_kind': 'Native',
}

{% endcode %}

  • default_ns sets the nameserver which are used
  • dnssec_on_create specifies if DNSSEC should be enabled when creating zones
  • zone_kind is the type that will be used when creating the zone.
    Can be one of Native, Master or Slave, when not specified it defaults to Native.
    Please see PowerDNS documentation for explanation of the kinds.
    Note that these tokens are case-sensitive!

Usage

An example configuration:

{% code title="dnsconfig.js" %}

var REG_NONE = NewRegistrar("none");
var DSP_POWERDNS = NewDnsProvider("powerdns");

D("example.tld", REG_NONE, DnsProvider(DSP_POWERDNS),
    A("test", "1.2.3.4")
);

{% endcode %}

Activation

See the PowerDNS documentation how the API can be enabled.