I've got an Amazon VPC with a bastion and service discovery router (Consul) that I'm using to route traffic from my company's intranet to the VPC.
Now I'm running jobs in the VPC (Webdriver) that need to look up newly registered services from a docker swarm host.
From the VPC I want to point to the service discovery server.
I want to create this dns wildcard entry using Terraform.
This is my first go at it - but I feel like something is missing:
resource "aws_route53_record" "*" {
zone_id = "${myzone.primary.zone_id}"
name = "*.cloud.companyintranet.com"
type = "A"
ttl = "300"
records = ["${aws_eip.lb.public_ip}"]
}
My question is: How to use Terraform to create a wildcard dns record in an Amazon VPC to point to a service discovery server?