github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/aws/d/elb_hosted_zone_id.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_elb_hosted_zone_id" 4 sidebar_current: "docs-aws-datasource-elb-hosted-zone-id" 5 description: |- 6 Get AWS Elastic Load Balancing Hosted Zone Id 7 --- 8 9 # aws\_elb\_hosted\_zone\_id 10 11 Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId 12 in a given region for the purpose of using in an AWS Route53 Alias. 13 14 ## Example Usage 15 16 ```hcl 17 data "aws_elb_hosted_zone_id" "main" {} 18 19 resource "aws_route53_record" "www" { 20 zone_id = "${aws_route53_zone.primary.zone_id}" 21 name = "example.com" 22 type = "A" 23 24 alias { 25 name = "${aws_elb.main.dns_name}" 26 zone_id = "${data.aws_elb_hosted_zone_id.main.id}" 27 evaluate_target_health = true 28 } 29 } 30 ``` 31 32 ## Argument Reference 33 34 * `region` - (Optional) Name of the region whose AWS ELB HostedZoneId is desired. 35 Defaults to the region from the AWS provider configuration. 36 37 38 ## Attributes Reference 39 40 * `id` - The ID of the AWS ELB HostedZoneId in the selected region.