“Route53” vs “Route53 Domains” Terraform Resource Collections


“Route53” vs “Route53 Domains” Terraform Resource Collections

Do you know the difference between “Route53” vs “Route53 Domains” Terraform resources?

You probably don’t even know there is a separate Route53 Domains Terraform module? I sure didn’t until I was setting up CloudWarGames.com.

Most of the functionality for Route53 is in the regular Route 53 collection of resources.

The “Route53 Domains” are specifically for either registering or importing a domain you may have purchased. Now don’t get that confused with a hosted zone which is a collection of DNS records.

This “Route53 Domain” is for the domain registration and specifying which name servers it points at. So you use the resources in “Route 53 Domain” to point at the “Route 53” Hosted Zone’s name server which then has a bunch of A, CNAME, TXT, et records.

It is a bit complicated so feel free to shoot me a question if you ever get stuck on this.

There are only 3 resource types in the “Route 53 Domain” set of terraform resources.

aws_route53domains_registered_domain

This is to import a domain that is already registered via the console.

If you are paying close attention you might ask what happens if you ever destroy that resource? Do you just lose the domain? According to their documentation no. It just removes it from state.

The aws_route53domains_registered_domain resource behaves differently from normal resources in that if a domain has been registered, Terraform does not register this domain, but instead "adopts" it into management. terraform destroy does not delete the domain but does remove the resource from Terraform state.

I have not tested this yet but if people are interested I can give a run with a dummy domain. I have enough of them.

aws_route53domains_domain:

This is for registering and renewing a domain. I have not tried it yet but next time I need a domain registered I will give it a try.

aws_route53domains_delegation_signer_record:

This handles “Domain Name System Security Extensions” which is some fancy encryption security stuff that deserves its own dedicated post. I added it to the back log of things to cover in my daily writing. Ping me if you want a deep dive.

Wrapping It Up:

Are you using the “Route53 Domains” Terraform resources? If so, how have you implemented them?