Using Alias Records breaks DNSControl
@@ -266,6 +266,7 @@ func nativeToRecords(set *adns.RecordSet, origin string) []*models.RecordConfig
var results []*models.RecordConfig
switch rtype := *set.Type; rtype {
case "Microsoft.Network/dnszones/A":
+ if *set.ARecords != nil {
for _, rec := range *set.ARecords {
rc := &models.RecordConfig{TTL: uint32(*set.TTL)}
rc.SetLabelFromFQDN(*set.Fqdn, origin)
@@ -273,7 +274,9 @@ func nativeToRecords(set *adns.RecordSet, origin string) []*models.RecordConfig
_ = rc.SetTarget(*rec.Ipv4Address)
results = append(results, rc)
}
+ }
case "Microsoft.Network/dnszones/AAAA":
+ if *set.AaaaRecords != nil {
for _, rec := range *set.AaaaRecords {
rc := &models.RecordConfig{TTL: uint32(*set.TTL)}
rc.SetLabelFromFQDN(*set.Fqdn, origin)
@@ -281,6 +284,7 @@ func nativeToRecords(set *adns.RecordSet, origin string) []*models.RecordConfig
_ = rc.SetTarget(*rec.Ipv6Address)
results = append(results, rc)
}
+ }
case "Microsoft.Network/dnszones/CNAME":
rc := &models.RecordConfig{TTL: uint32(*set.TTL)}
rc.SetLabelFromFQDN(*set.Fqdn, origin)
