With AWS, how can I get deterministic name server addresses between terraform apply/destroy executions?
At the moment, my name servers are something like this:
ns-XXX.awsdns-YY.com.
ns-XXX.awsdns-YY.org.
ns-XXX.awsdns-YY.net.
ns-XXX.awsdns-YY.co.uk.
And each time I run apply/destroy, the values of XXX and YY change.
So if I have a domain registered with godaddy/namecheap/other, then these also need to be updated, which takes time to propagate.
So I am wondering is there a way to influence what XXX/YY values are, so that they may persist between sessions?
For example, I tried this, and although it set the name servers as I had desired, unfortunately it wouldn't resolve.
resource "aws_route53_record" "ns" {
allow_overwrite = true
name = "my_fixed_ns"
ttl = 30
type = "NS"
zone_id = aws_route53_zone.zone.zone_id
records = [
"ns1.amazon.com",
"ns2.amazon.org",
"ns3.amazon.net",
"ns4.amazon.co.uk"
]
}