diff --git a/clouddns.go b/clouddns.go index b2eb691..8846cf7 100644 --- a/clouddns.go +++ b/clouddns.go @@ -92,7 +92,8 @@ func dumpZonefile(dnsSpec *CloudDNSSpec) { func rrsetsEqual(x *dns.ResourceRecordSet, y *dns.ResourceRecordSet) bool { if x.Type != y.Type || - x.Name != y.Name { + x.Name != y.Name || + x.Ttl != y.Ttl { return false } diff --git a/clouddns_test.go b/clouddns_test.go index 27e847e..a8113e0 100644 --- a/clouddns_test.go +++ b/clouddns_test.go @@ -52,6 +52,21 @@ func Test_rrsetsEqual(t *testing.T) { }, want: false, }, + { + name: "DifferingTtl", + args: args{ + x: &dns.ResourceRecordSet{ + Type: "A", + Name: "hostname.example.com", + Ttl: 60, + }, + y: &dns.ResourceRecordSet{ + Type: "A", + Name: "hostname.example.com", + }, + }, + want: false, + }, { name: "DifferingRRdatas_len", args: args{