mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
POWERDNS: Add option to set the PowerDNS zone kind (#2274)
Signed-off-by: Jan-Philipp Benecke <jan-philipp@bnck.me>
This commit is contained in:
committed by
GitHub
parent
be8495c5e8
commit
1d252dd482
@ -29,13 +29,19 @@ Following metadata are available:
|
||||
'a.example.com.',
|
||||
'b.example.com.'
|
||||
],
|
||||
'dnssec_on_create': false
|
||||
'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.
|
||||
<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!**
|
||||
|
||||
|
||||
## Usage
|
||||
An example configuration:
|
||||
|
@ -86,6 +86,7 @@ func (dsp *powerdnsProvider) EnsureZoneExists(domain string) error {
|
||||
Type: zones.ZoneTypeZone,
|
||||
DNSSec: dsp.DNSSecOnCreate,
|
||||
Nameservers: dsp.DefaultNS,
|
||||
Kind: dsp.ZoneKind,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package powerdns
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/mittwald/go-powerdns/apis/zones"
|
||||
|
||||
"github.com/StackExchange/dnscontrol/v3/models"
|
||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||
@ -42,6 +43,7 @@ type powerdnsProvider struct {
|
||||
ServerName string
|
||||
DefaultNS []string `json:"default_ns"`
|
||||
DNSSecOnCreate bool `json:"dnssec_on_create"`
|
||||
ZoneKind zones.ZoneKind `json:"zone_kind"`
|
||||
|
||||
nameservers []*models.Nameserver
|
||||
}
|
||||
|
Reference in New Issue
Block a user