mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00: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:
@ -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>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>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!**
|
<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
|
## Usage
|
||||||
An example configuration:
|
An example configuration:
|
||||||
|
@ -87,6 +87,7 @@ func (dsp *powerdnsProvider) EnsureZoneExists(domain string) error {
|
|||||||
DNSSec: dsp.DNSSecOnCreate,
|
DNSSec: dsp.DNSSecOnCreate,
|
||||||
Nameservers: dsp.DefaultNS,
|
Nameservers: dsp.DefaultNS,
|
||||||
Kind: dsp.ZoneKind,
|
Kind: dsp.ZoneKind,
|
||||||
|
SOAEditAPI: dsp.SOAEditAPI,
|
||||||
})
|
})
|
||||||
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/mittwald/go-powerdns/apis/zones"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v4/models"
|
"github.com/StackExchange/dnscontrol/v4/models"
|
||||||
@ -44,6 +45,7 @@ type powerdnsProvider struct {
|
|||||||
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"`
|
ZoneKind zones.ZoneKind `json:"zone_kind"`
|
||||||
|
SOAEditAPI string `json:"soa_edit_api,omitempty"`
|
||||||
|
|
||||||
nameservers []*models.Nameserver
|
nameservers []*models.Nameserver
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user