correct rejection of azure-private-dns-zones not matching filters.

This commit is contained in:
saidst 2020-01-27 15:26:17 +01:00
parent 432d0696a3
commit 6ff3e03e60

View File

@ -175,20 +175,10 @@ func (p *AzurePrivateDNSProvider) zones(ctx context.Context) ([]privatedns.Priva
zone := i.Value() zone := i.Value()
log.Debugf("Validating Zone: %v", *zone.Name) log.Debugf("Validating Zone: %v", *zone.Name)
if zone.Name == nil { if zone.Name != nil && p.domainFilter.Match(*zone.Name) && p.zoneIDFilter.Match(*zone.ID) {
continue zones = append(zones, zone)
} }
if !p.domainFilter.Match(*zone.Name) {
continue
}
if !p.zoneIDFilter.Match(*zone.ID) {
continue
}
zones = append(zones, zone)
err := i.NextWithContext(ctx) err := i.NextWithContext(ctx)
if err != nil { if err != nil {
return nil, err return nil, err