This commit is contained in:
Jakob Ackermann 2025-12-08 13:12:40 -05:00 committed by GitHub
commit 4aaa09ac5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -83,7 +83,10 @@ func init() {
// EnsureZoneExists creates a zone if it does not exist
func (c *exoscaleProvider) EnsureZoneExists(domain string, metadata map[string]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
}