2020-05-30 21:54:07 +08:00
|
|
|
## Configuration
|
|
|
|
|
2022-05-09 02:41:33 +08:00
|
|
|
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](https://doc.powerdns.com/authoritative/http-api/index.html).
|
|
|
|
In most cases the Server id is `localhost`.
|
|
|
|
|
|
|
|
Example:
|
2020-05-30 21:54:07 +08:00
|
|
|
|
2023-03-03 05:17:27 +08:00
|
|
|
{% code title="creds.json" %}
|
2022-02-18 01:22:31 +08:00
|
|
|
```json
|
2020-05-30 21:54:07 +08:00
|
|
|
{
|
|
|
|
"powerdns": {
|
2022-05-09 02:41:33 +08:00
|
|
|
"TYPE": "POWERDNS",
|
2020-11-29 04:43:13 +08:00
|
|
|
"apiKey": "your-key",
|
2022-05-09 02:41:33 +08:00
|
|
|
"apiUrl": "http://localhost",
|
2020-11-29 04:43:13 +08:00
|
|
|
"serverName": "localhost"
|
2020-05-30 21:54:07 +08:00
|
|
|
}
|
|
|
|
}
|
2022-02-18 01:22:31 +08:00
|
|
|
```
|
2023-03-03 05:17:27 +08:00
|
|
|
{% endcode %}
|
2020-05-30 21:54:07 +08:00
|
|
|
|
|
|
|
## Metadata
|
|
|
|
Following metadata are available:
|
|
|
|
|
2023-03-11 21:42:01 +08:00
|
|
|
{% code title="dnsconfig.js" %}
|
2023-01-20 20:56:20 +08:00
|
|
|
```javascript
|
2020-05-30 21:54:07 +08:00
|
|
|
{
|
|
|
|
'default_ns': [
|
|
|
|
'a.example.com.',
|
|
|
|
'b.example.com.'
|
|
|
|
],
|
2023-04-25 06:16:23 +08:00
|
|
|
'dnssec_on_create': false,
|
|
|
|
'zone_kind': 'Native',
|
2020-05-30 21:54:07 +08:00
|
|
|
}
|
2022-02-18 01:22:31 +08:00
|
|
|
```
|
2023-03-11 21:42:01 +08:00
|
|
|
{% endcode %}
|
2020-05-30 21:54:07 +08:00
|
|
|
|
|
|
|
- `default_ns` sets the nameserver which are used
|
|
|
|
- `dnssec_on_create` specifies if DNSSEC should be enabled when creating zones
|
2023-04-25 06:16:23 +08:00
|
|
|
- `zone_kind` is the type that will be used when creating the zone.
|
|
|
|
<br>Can be one of `Native`, `Master` or `Slave`, when not specified it defaults to `Native`.
|
|
|
|
<br>Please see [PowerDNS documentation](https://doc.powerdns.com/authoritative/modes-of-operation.html) for explanation of the kinds.
|
|
|
|
<br>**Note that these tokens are case-sensitive!**
|
|
|
|
|
2020-05-30 21:54:07 +08:00
|
|
|
|
|
|
|
## Usage
|
2023-03-11 21:42:01 +08:00
|
|
|
An example configuration:
|
2020-05-30 21:54:07 +08:00
|
|
|
|
2023-03-11 21:42:01 +08:00
|
|
|
{% code title="dnsconfig.js" %}
|
2023-01-20 20:56:20 +08:00
|
|
|
```javascript
|
2022-05-09 02:41:33 +08:00
|
|
|
var REG_NONE = NewRegistrar("none");
|
|
|
|
var DSP_POWERDNS = NewDnsProvider("powerdns");
|
2020-05-30 21:54:07 +08:00
|
|
|
|
2022-05-09 02:41:33 +08:00
|
|
|
D("example.tld", REG_NONE, DnsProvider(DSP_POWERDNS),
|
|
|
|
A("test", "1.2.3.4")
|
2020-05-30 21:54:07 +08:00
|
|
|
);
|
2022-02-18 01:22:31 +08:00
|
|
|
```
|
2023-03-11 21:42:01 +08:00
|
|
|
{% endcode %}
|
2020-05-30 21:54:07 +08:00
|
|
|
|
|
|
|
## Activation
|
|
|
|
See the [PowerDNS documentation](https://doc.powerdns.com/authoritative/http-api/index.html) how the API can be enabled.
|