title: CNAME-Alias in Terraform / Route53
body: <p>I have an existing dns entry like 
   "something.domainmanagedbyroute53.de.";"3600";"IN";"CNAME";"";"server.some-external-domain.de"</p>
  
  <p>and want to express this ALIAS in Terraform for Route53.</p>
  
  <p>Under <a href="https://www.terraform.io/docs/providers/aws/r/route53_record.html" rel="nofollow noreferrer">https://www.terraform.io/docs/providers/aws/r/route53_record.html</a>
  I got the impression that I have to use something like</p>
  
  <pre><code>resource "aws_elb" "main" {
       name               = "foobar-terraform-elb"
       availability_zones = ["us-east-1c"] 
  
       listener {
         instance_port     = 80
         instance_protocol = "http"
         lb_port           = 80
         lb_protocol       = "http"
       }
     }
  
     resource "aws_route53_record" "www" {
       zone_id = "${aws_route53_zone.primary.zone_id}"
       name    = "example.com"
       type    = "A"
  
       alias {
         name                   = "${aws_elb.main.dns_name}"
         zone_id                = "${aws_elb.main.zone_id}"
         evaluate_target_health = true
       }
     }
  </code></pre>
  
  <p>However I am wondering where the target goes...</p>