mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-07 21:54:59 +08:00
POWERDNS: Add option to set SOA-EDIT-API when creating zones via the API (#2458)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
parent
012c9441cb
commit
d93308f54b
3 changed files with 7 additions and 1 deletions
|
@ -41,7 +41,10 @@ Following metadata are available:
|
|||
<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!**
|
||||
|
||||
- `soa_edit_api` is the default SOA serial method that is used for zone created with the API
|
||||
<br> Can be one of `DEFAULT`, `INCREASE`, `EPOCH`, `SOA-EDIT` or `SOA-EDIT-INCREASE`, default format is YYYYMMDD01.
|
||||
<br>Please see [PowerDNS SOA-EDIT-DNSUPDATE documentation](https://doc.powerdns.com/authoritative/dnsupdate.html#soa-edit-dnsupdate-settings) for explanation of the kinds.
|
||||
<br>**Note that these tokens are case-sensitive!**
|
||||
|
||||
## Usage
|
||||
An example configuration:
|
||||
|
|
|
@ -87,6 +87,7 @@ func (dsp *powerdnsProvider) EnsureZoneExists(domain string) error {
|
|||
DNSSec: dsp.DNSSecOnCreate,
|
||||
Nameservers: dsp.DefaultNS,
|
||||
Kind: dsp.ZoneKind,
|
||||
SOAEditAPI: dsp.SOAEditAPI,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package powerdns
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/mittwald/go-powerdns/apis/zones"
|
||||
|
||||
"github.com/StackExchange/dnscontrol/v4/models"
|
||||
|
@ -44,6 +45,7 @@ type powerdnsProvider struct {
|
|||
DefaultNS []string `json:"default_ns"`
|
||||
DNSSecOnCreate bool `json:"dnssec_on_create"`
|
||||
ZoneKind zones.ZoneKind `json:"zone_kind"`
|
||||
SOAEditAPI string `json:"soa_edit_api,omitempty"`
|
||||
|
||||
nameservers []*models.Nameserver
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue