I have a need to establish the Route53 main domain in a central AWS account and create subdomains in another account (Full setup). Could you please guide me on how to achieve this using Terraform?
While I am aware that we can create a hosted zone in the central account and generate subdomains in the other account, I am particularly interested in understanding how to add NS records for subdomains to the central account.
I would like to have one single deployment with all steps.
- Create main hosted zone domain record in central account account.
- Create sub domain in DEV, PROD account separately.
- Add subdomain NS records to main domain.
Ideas will be helpful.