How to Create Route 53 Records from AWS Cross-Accounts with Terraform

Guillermo Musumeci
5 min readJun 16, 2022

Over the last few weeks, I wrote a couple of stories on how to use Terraform to create internal and external load balancers and use ACM to create SSL certificates and write records in Route 53 (see below).

However, these two examples work only when we have the Route 53 public hosted zone in the same AWS account.

In this story, we will learn how to create records in a Route 53 Hosted Zone located on a different AWS account (usually called cross-account).

This story can be used as a reference to implement multi-account solutions in AWS with Terraform or share Route 53 domains across multiple AWS Accounts.

Note: There are several ways to do this, however, I found this way the simplest one to implement.

Defining Multiple AWS Accounts in the Provider File

A typical provider file should look like this:

# Terraform Provider
terraform {
required_providers {
aws = {
source =…

--

--

Guillermo Musumeci
Guillermo Musumeci

Written by Guillermo Musumeci

Certified AWS, Azure & GCP Architect | HashiCorp Ambassador | Terraform SME | KopiCloud Founder | ex-AWS | Entrepreneur | Book Author | Husband & Dad of ✌

Responses (1)