mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-10 15:14:25 +08:00
EXOSCALE: finish implementation of zone creation
This commit is contained in:
parent
2461f3dc50
commit
ce8453042e
1 changed files with 4 additions and 1 deletions
|
@ -83,7 +83,10 @@ func init() {
|
|||
// EnsureZoneExists creates a zone if it does not exist
|
||||
func (c *exoscaleProvider) EnsureZoneExists(domain string) error {
|
||||
_, err := c.findDomainByName(domain)
|
||||
|
||||
if err == ErrDomainNotFound {
|
||||
d := &egoscale.DNSDomain{UnicodeName: &domain}
|
||||
_, err = c.client.CreateDNSDomain(context.Background(), c.apiZone, d)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue