R53_ALIAS records don't support TTL
Describe the bug
Per the AWS docs, R53_ALIAS records don't have their own TTL. Instead, they use the TTL of whatever record they are an alias to. If you set a TTL on a R53_ALIAS record that's different than the TTL of the aliased record, dnscontrol will see that record as perpetually out of sync.
To Reproduce
D("example.org", REG_MY_PROVIDER, DnsProvider("ROUTE53"),
, DefaultTTL("10m")
, A("foo", "1.2.3.4", TTL("5m"))
, R53_ALIAS("bar", "A", "foo") // dnscontrol will continuously try to change the TTL of this to 10m.
)
Expected behavior
I think it would make sense for R53_ALIAS records to ignore DefaultTTL() and TTL(). In the case of TTL(), it should probably also print a warning that it's unsupported.
DNS Provider
- AWS Route 53
Additional context
CC @tresni
Agreed. We should either print a warning if there is a mismatch, or copy the TTL from the underlying record, or rework the diff2 module to know to ignore TTL settings for certain record types. My preference is either of the first two.
R53_ALIAS('foo', 'A', 'lib-lb-502.us-east-1.elb.amazonaws.com.', R53_ZONE('ZONEID')),
Will try setting the TTL from our default back to 300 seconds, and when you look in the R53 console, TTL isn't an option that can be set.
A more simple solution is to update the ROUTE53 doc to explain the situation and recommend how to fix it. We can code our way out of every problem. @misilot: would you please provide a draft paragraph for the docs?