- Newest
- Most votes
- Most comments
hi,
same to me.
I transfered my .de domain to route53.
My setup is done via Terraform
Name servers for my domain needs to be set by hand to same as in hosted zone.
Pretty sure there is a better solution. :)
Here is my config:
route53.tf:
resource "aws_route53_zone" "wshtoolsde" {
name = var.domain_name
tags = {
Environment = "dev"
}
}
resource "aws_route53_record" "ns" {
zone_id = aws_route53_zone.wshtoolsde.zone_id
#region = "eu-central-1"
name = "www.wsh-tools.de"
type = "NS"
ttl = "300"
records = aws_route53_zone.wshtoolsde.name_servers
}
resource "aws_route53_record" "domain" {
zone_id = aws_route53_zone.wshtoolsde.zone_id
name = "wsh-tools.de"
type = "A"
alias {
name = aws_lb.app.dns_name
zone_id = aws_lb.app.zone_id
evaluate_target_health = true
}
}
resource "aws_route53_record" "www" {
zone_id = aws_route53_zone.wshtoolsde.zone_id
name = "www.wsh-tools.de"
type = "A"
alias {
name = aws_lb.app.dns_name
zone_id = aws_lb.app.zone_id
evaluate_target_health = true
}
}
lb.tf:
resource "aws_lb" "app" {
name = "${random_pet.app.id}-lb"
internal = false
load_balancer_type = "application"
subnets = module.vpc.public_subnets
security_groups = [module.lb_security_group.this_security_group_id]
#access_logs {
bucket = "wshimport"
enabled = true
#}
tags = {
Name = "EXTERNAL-ELB"
}
}
resource "aws_lb_listener" "external_lb_http" {
load_balancer_arn = aws_lb.app.arn
port = "80"
protocol = "HTTP"
default_action {
type = "forward"
target_group_arn = aws_lb_target_group.ec2.arn
}
}
When I am open my load balancers dns name, my test page is working:
fancy-boxer-lb-46656340.eu-central-1.elb.amazonaws.com
Unfortunately I also get DNS_PROBE_FINISHED_NXDOMAIN when I visit it via wsh-tools.de
Much appreciate your help
best
paul
