github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/d/route53_zone.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_route53_zone"
     4  sidebar_current: "docs-aws-datasource-route53-zone"
     5  description: |-
     6      Provides details about a specific Route 53 Hosted Zone
     7  ---
     8  
     9  # aws\_route53\_zone
    10  
    11  `aws_route53_zone` provides details about a specific Route 53 Hosted Zone.
    12  
    13  This data source allows to find a Hosted Zone ID given Hosted Zone name and certain search criteria.
    14  
    15  ## Example Usage
    16  
    17  The following example shows how to get a Hosted Zone from it's name and from this data how to create a Record Set.
    18  
    19  
    20  ```hcl
    21  data "aws_route53_zone" "selected" {
    22    name         = "test.com."
    23    private_zone = true
    24  }
    25  
    26  resource "aws_route53_record" "www" {
    27    zone_id = "${data.aws_route53_zone.selected.zone_id}"
    28    name    = "www.${data.aws_route53_zone.selected.name}"
    29    type    = "A"
    30    ttl     = "300"
    31    records = ["10.0.0.1"]
    32  }
    33  ```
    34  
    35  ## Argument Reference
    36  
    37  The arguments of this data source act as filters for querying the available
    38  Hosted Zone. You have to use `zone_id` or `name`, not both of them. The given filter must match exactly one
    39  Hosted Zone. If you use `name` field for private Hosted Zone, you need to add `private_zone` field to `true`
    40  
    41  * `zone_id` - (Optional) The Hosted Zone id of the desired Hosted Zone.
    42  
    43  * `name` - (Optional) The Hosted Zone name of the desired Hosted Zone.
    44  * `private_zone` - (Optional) Used with `name` field to get a private Hosted Zone.
    45  * `vpc_id` - (Optional) Used with `name` field to get a private Hosted Zone associated with the vpc_id (in this case, private_zone is not mandatory).
    46  * `tags` - (Optional) Used with `name` field. A mapping of tags, each pair of which must exactly match
    47  a pair on the desired security group.
    48  ## Attributes Reference
    49  
    50  All of the argument attributes are also exported as
    51  result attributes. This data source will complete the data by populating
    52  any fields that are not included in the configuration with the data for
    53  the selected Hosted Zone.
    54  
    55  The following attribute is additionally exported:
    56  
    57  * `caller_reference` - Caller Reference of the Hosted Zone.
    58  * `comment` - The comment field of the Hosted Zone.
    59  * `resource_record_set_count` - the number of Record Set in the Hosted Zone