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.',
|
'a.example.com.',
|
||||||
'b.example.com.'
|
'b.example.com.'
|
||||||
],
|
],
|
||||||
'dnssec_on_create': false
|
'dnssec_on_create': false,
|
||||||
|
'zone_kind': 'Native',
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
{% endcode %}
|
{% endcode %}
|
||||||
|
|
||||||
- `default_ns` sets the nameserver which are used
|
- `default_ns` sets the nameserver which are used
|
||||||
- `dnssec_on_create` specifies if DNSSEC should be enabled when creating zones
|
- `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
|
## Usage
|
||||||
An example configuration:
|
An example configuration:
|
||||||
|
@ -86,6 +86,7 @@ func (dsp *powerdnsProvider) EnsureZoneExists(domain string) error {
|
|||||||
Type: zones.ZoneTypeZone,
|
Type: zones.ZoneTypeZone,
|
||||||
DNSSec: dsp.DNSSecOnCreate,
|
DNSSec: dsp.DNSSecOnCreate,
|
||||||
Nameservers: dsp.DefaultNS,
|
Nameservers: dsp.DefaultNS,
|
||||||
|
Kind: dsp.ZoneKind,
|
||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package powerdns
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/mittwald/go-powerdns/apis/zones"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
@ -40,8 +41,9 @@ type powerdnsProvider struct {
|
|||||||
APIKey string
|
APIKey string
|
||||||
APIUrl string
|
APIUrl string
|
||||||
ServerName string
|
ServerName string
|
||||||
DefaultNS []string `json:"default_ns"`
|
DefaultNS []string `json:"default_ns"`
|
||||||
DNSSecOnCreate bool `json:"dnssec_on_create"`
|
DNSSecOnCreate bool `json:"dnssec_on_create"`
|
||||||
|
ZoneKind zones.ZoneKind `json:"zone_kind"`
|
||||||
|
|
||||||
nameservers []*models.Nameserver
|
nameservers []*models.Nameserver
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user