From 5dfc8ca935d86cf6d80863ab307d83d1fa320b3b Mon Sep 17 00:00:00 2001 From: Yuhui Xu Date: Thu, 18 Jan 2024 06:06:36 -0800 Subject: [PATCH] GCORE: enable ALIAS records (#2802) --- providers/gcore/gcoreProvider.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/providers/gcore/gcoreProvider.go b/providers/gcore/gcoreProvider.go index 81d2fceb8..357c7c4b0 100644 --- a/providers/gcore/gcoreProvider.go +++ b/providers/gcore/gcoreProvider.go @@ -43,7 +43,7 @@ func NewGCore(m map[string]string, metadata json.RawMessage) (providers.DNSServi var features = providers.DocumentationNotes{ providers.CanAutoDNSSEC: providers.Cannot(), providers.CanGetZones: providers.Can(), - providers.CanUseAlias: providers.Cannot(), + providers.CanUseAlias: providers.Can(), providers.CanUseCAA: providers.Can(), providers.CanUseDS: providers.Cannot(), providers.CanUseLOC: providers.Cannot(), @@ -136,6 +136,13 @@ func (c *gcoreProvider) GetZoneRecordsCorrections(dc *models.DomainConfig, exist var deletions []*models.Correction var reports []*models.Correction + // Gcore auto uses ALIAS for apex zone CNAME records, just like CloudFlare + for _, rec := range dc.Records { + if rec.Type == "ALIAS" { + rec.Type = "CNAME" + } + } + changes, err := diff2.ByRecordSet(existing, dc, nil) if err != nil { return nil, err