Sitemap

Terraform Route53 Error — Tried to create an alias, but the alias target name does not lie within the target zone

Sep 9, 2024

This is a quick post to show how to fix the following error

Press enter or click to view image in full size

When you are setting the zone_id for an alias, it is not the DNS zone ID that you should use, instead, you should get the Hosted Zone ID of Elastic Load Balancing here:

Get the load balancer zoneID corresponding to your region:

Add to your terraform code, and run apply again:

Press enter or click to view image in full size

That’s it, hope it helps!

Follow me on: Linkedin

--

--

Rafael Medeiros
Rafael Medeiros

Written by Rafael Medeiros

DevOps Engineer | CNCF Kubestronaut | 3x Azure Certified | Cloud & Security Enthusiast | Another IT professional willing to help the community

No responses yet