• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Terraform and route 53: redirect to home router with nginx load balancer

Resolved: Terraform and route 53: redirect to home router with nginx load balancer

0
By Isaac Tonny on 15/03/2023 Issue
Share
Facebook Twitter LinkedIn

In this post, we will see how to resolve Terraform and route 53: redirect to home router with nginx load balancer

Question:

I own a domain name, let’s say fancydomain.com (managed through AWS). I also have a kubernetes cluster running somewhere (but not on AWS), with a nginx ingress controller that acts as a load balancer. I have the IP of the load balancer.
I would like to point the domain name to the IP of the load balancer, and I would like the load balancer to handle the TLS certificate. But I’m struggling in two places:
  • It looks like I’m failing to properly redirect to the IP of the LB
  • I don’t understand how/where the TLS certificate (created by AWS) should be integrated

So far this is my terraform:
Also, the nginx load balancer does work at the moment. It uses a self-signed certificate, and if I lure my computer by modifying the /etc/hosts like below, I managed to access the domain by querying https://fancydomain.com.:
/etc/hosts
Any idea what I could try to get unstuck?
EDIT: The name servers for the registered domain are the same as the hosted zone’s ones:
enter image description here
enter image description here

Best Answer:

Ultimately I think @erik258 was right, I think the name servers of the registered domain probably weren’t in sync with the ones from the hosted zone. I ended up using a data source for the name servers of the zone, and I used it to set the ones in the register domain. Behold:
After I applied that it started working. Still not 100% sure of what was the problem before.

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com

amazon-web-services
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: net::ERR_HTTP2_PROTOCOL_ERROR by http get request angular 15.2

02/04/2023

Resolved: How do I stop the command from happening if the requirements for it to work aren’t sert Discord.js

02/04/2023

Resolved: How to scroll bottom of div at launch?

02/04/2023

Comments are closed.

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.