Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion pkg/providers/dns/resource_akamai_dns_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,9 @@ func diffQuotedDNSRecord(oldTargetList []string, newTargetList []string, o strin
compList = oldTargetList
} else {
baseVal = o
baseVal = strings.Trim(baseVal, backslashQuote)
if recordType != RRTypeTxt {
baseVal = strings.Trim(baseVal, backslashQuote)
}
baseVal = strings.ReplaceAll(baseVal, backslashQuote, singleQuote)
compList = newTargetList
}
Expand Down Expand Up @@ -537,6 +539,21 @@ func diffQuotedDNSRecord(oldTargetList []string, newTargetList []string, o strin
return false
}

if recordType == RRTypeTxt {
for _, compval := range compList {
if compTrim && strings.Contains(compval, backslashQuote) {
compval = strings.ReplaceAll(compval, backslashQuote, singleQuote)
}
logger.Debugf("diffQuotedDNSRecord Suppress. baseVal: %v", baseVal)
logger.Debugf("diffQuotedDNSRecord Suppress. compval: [%v]", compval)

if baseVal == compval {
return true
}
}
return false
}

for _, compval := range compList {
if compTrim && strings.Contains(compval, backslashQuote) {
compval = strings.ReplaceAll(compval, backslashQuote, singleQuote)
Expand Down