I am trying to use Terraform to dynamically configure a domain’s DNS servers. The domain in question is hosted using Route53. If I was doing this via the AWS CLI, I could use the following command:
aws route53domains update-domain-nameservers \
--region us-east-1 \
--domain-name example.com \
--nameservers Name=ns-1.awsdns-01.org Name=ns-2.awsdns-02.co.uk Name=ns-3.awsdns-03.net Name=ns-4.awsdns-04.com
as documented here. Note that it also allows you to set the Glue IPs for these nameservers.
How do I go about doing this in Terraform?