From f7d39b578a0f369049854bd4aa637a535faef412 Mon Sep 17 00:00:00 2001 From: Max Ratmeyer <17440617+MaxRatmeyer@users.noreply.github.com> Date: Mon, 6 Jul 2020 20:29:25 -0400 Subject: [PATCH] NS1: Added support for ALIAS, PTR, and TXTMuli (#776) --- providers/ns1/ns1provider.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/providers/ns1/ns1provider.go b/providers/ns1/ns1provider.go index cda9a57fe..0540c2f6d 100644 --- a/providers/ns1/ns1provider.go +++ b/providers/ns1/ns1provider.go @@ -15,6 +15,9 @@ import ( ) var docNotes = providers.DocumentationNotes{ + providers.CanUseAlias: providers.Can(), + providers.CanUsePTR: providers.Can(), + providers.CanUseTXTMulti: providers.Can(), providers.DocCreateDomains: providers.Cannot(), providers.DocOfficiallySupported: providers.Cannot(), providers.DocDualHost: providers.Can(), @@ -150,6 +153,11 @@ func convert(zr *dns.ZoneRecord, domain string) ([]*models.RecordConfig, error) } rec.SetLabelFromFQDN(zr.Domain, domain) switch rtype := zr.Type; rtype { + case "ALIAS": + rec.Type = rtype + if err := rec.SetTarget(ans); err != nil { + panic(fmt.Errorf("unparsable ALIAS record received from ns1: %w", err)) + } default: if err := rec.PopulateFromString(rtype, ans, domain); err != nil { panic(fmt.Errorf("unparsable record received from ns1: %w", err))