Skip to content

Commit 1762813

Browse files
authored
Fix Cloudflare AAAA creation (#242)
1 parent fb542ae commit 1762813

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

internal/provider/cloudflare/cloudflare_handler.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,16 @@ func (provider *DNSProvider) getDNSRecords(zoneID string) []DNSRecord {
226226
}
227227

228228
func (provider *DNSProvider) createRecord(zoneID, domain, subDomain, ip string) error {
229+
var recordType string
230+
231+
if provider.configuration.IPType == "" || strings.ToUpper(provider.configuration.IPType) == utils.IPV4 {
232+
recordType = utils.IPTypeA
233+
} else if strings.ToUpper(provider.configuration.IPType) == utils.IPV6 {
234+
recordType = utils.IPTypeAAAA
235+
}
236+
229237
newRecord := DNSRecord{
230-
Type: utils.IPTypeA,
238+
Type: recordType,
231239
IP: ip,
232240
TTL: 1,
233241
}

0 commit comments

Comments
 (0)