Add a dummy DNS record for load balancer.
This commit is contained in:
parent
d1b4cfff48
commit
b927d6346a
|
@ -30,3 +30,37 @@ module "standalone_ec2" {
|
|||
|
||||
tags = var.tags
|
||||
}
|
||||
|
||||
module "zones" {
|
||||
source = "terraform-aws-modules/route53/aws//modules/zones"
|
||||
version = "~> 2.0"
|
||||
|
||||
zones = {
|
||||
"clientapp.com" = {
|
||||
comment = "Public facing ALB name."
|
||||
}
|
||||
}
|
||||
|
||||
tags = var.tags
|
||||
}
|
||||
|
||||
module "records" {
|
||||
source = "terraform-aws-modules/route53/aws//modules/records"
|
||||
version = "~> 2.0"
|
||||
|
||||
zone_name = keys(module.zones.route53_zone_zone_id)[0]
|
||||
|
||||
records = [
|
||||
{
|
||||
name = "clientapp.com"
|
||||
type = "A"
|
||||
alias = {
|
||||
name = module.loadbalancer.lb_dns_name
|
||||
zone_id = module.loadbalancer.lb_zone_id
|
||||
evaluate_target_health = true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
depends_on = [module.zones, module.loadbalancer]
|
||||
}
|
Loading…
Reference in New Issue