Configuring Route 53 Subdomain Delegation With Terraform
DNS is one of those things that works so well in the background that nobody thinks about it until someone accidentally deletes an A record five minutes before a demo. As infrastructure grows and more environments show up, dumping every record for every environment into one giant hostxed zone starts to feel a lot like that moment, just waiting to happen. Zone delegation is the fix, and it's simpler to set up than most people expect.
Organizing hosted zones in separate environments
Instead of having a single hosted zone holding records of all environments mixed together, each environment gets its own hosted zone, and the parent zone just points to them. So example.com stays the parent, while dev.example.com and others become their own independent zones that happen to live under the same domain.
This isn't just tidiness for the sake of tidiness. A smaller blast radius is the biggest win...
Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE