AWS Route53 public 区域名称服务器和记录类型 NS 记录

AWS Route53 public zone name servers and record type NS records

对于创建的 AWS Route53 public 区域,我注意到使用 NS 和 SOA 记录创建的默认委派集。 但是该区域的名称服务器和 NS 记录类型似乎略有不同。我的意思是:

我注意到名称服务器记录以记录部分突出显示的句点结尾。但是在 hosted zone details 中,没有任何结束名称服务器记录的句点。为什么会这样,有什么区别需要理解。无法从 AWS 获取任何信息?

当我通过 terraform 提取记录时,它 returns ns 记录 没有 句点。当前,terraform 不支持从记录部分提取 ns 记录的数据资源。

有人可以教我吗。谢谢

名称服务器记录末尾的句点表示域名是完全合格的。它类似于文件系统中的绝对路径:/users/ec2-user/ vs ~/ in a Linux OS or C:\Users\ec2-user on a windows OS。离开尾随期通常是最佳做法。您可以在此处阅读有关此概念的更多信息:http://www.dns-sd.org./trailingdotsindomainnames.html

为什么记录有尾随句点以及托管区域域名不再(从提供商版本 3.0 开始)在数据源中有尾随句点的基本原理可以在 3.0 upgrade guide 中得到最好的解释:

Removal of trailing period in name argument

Previously the data-source returned the Hosted Zone Domain Name directly from the API, which included a . suffix. This proves difficult when many other AWS services do not accept this trailing period (e.g. ACM Certificate). This period is now automatically removed. For example, when the attribute would previously return a Hosted Zone Domain Name such as example.com., the attribute now will be returned as example.com. While the returned value will omit the trailing period, use of configurations with trailing periods will not be interrupted.

记录中的尾随句点是正确的,在这种情况下,Terraform 中带有尾随句点的参数值会在 READ 和 WRITE 操作时自动添加或省略,以完全准确和方便用户。