github.com/armen/terraform@v0.5.2-0.20150529052519-caa8117a08f1/website/source/docs/providers/aws/r/route53_zone.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_route53_zone"
     4  sidebar_current: "docs-aws-resource-route53-zone"
     5  description: |-
     6    Provides a Route53 Hosted Zone resource.
     7  ---
     8  
     9  # aws\_route53\_zone
    10  
    11  Provides a Route53 Hosted Zone resource.
    12  
    13  ## Example Usage
    14  
    15  ```
    16  resource "aws_route53_zone" "primary" {
    17     name = "example.com"
    18  }
    19  ```
    20  
    21  For use in subdomains, note that you need to create a
    22  `aws_route53_record` of type `NS` as well as the subdomain
    23  zone.
    24  
    25  ```
    26  resource "aws_route53_zone" "main" {
    27    name = "example.com"
    28  }
    29  
    30  resource "aws_route53_zone" "dev" {
    31    name = "dev.example.com"
    32  
    33    tags {
    34      Environment = "dev"
    35    }
    36  }
    37  
    38  resource "aws_route53_record" "dev-ns" {
    39      zone_id = "${aws_route53_zone.main.zone_id}"
    40      name = "dev.example.com"
    41      type = "NS"
    42      ttl = "30"
    43      records = [
    44          "${aws_route53_zone.dev.name_servers.0}",
    45          "${aws_route53_zone.dev.name_servers.1}",
    46          "${aws_route53_zone.dev.name_servers.2}",
    47          "${aws_route53_zone.dev.name_servers.3}"
    48      ]
    49  }
    50  ```
    51  
    52  ## Argument Reference
    53  
    54  The following arguments are supported:
    55  
    56  * `name` - (Required) This is the name of the hosted zone.
    57  * `comment` - (Optional) A comment for the hosted zone. Defaults to 'Managed by Terraform'.
    58  * `tags` - (Optional) A mapping of tags to assign to the zone.
    59  * `vpc_id` - (Optional) The VPC to associate with a private hosted zone. Specifying `vpc_id` will create a private hosted zone.
    60  * `vpc_region` - (Optional) The VPC's region. Defaults to the region of the AWS provider.
    61  
    62  ## Attributes Reference
    63  
    64  The following attributes are exported:
    65  
    66  * `zone_id` - The Hosted Zone ID. This can be referenced by zone records.
    67  * `name_servers` - A list of name servers in a default delegation set.
    68    Find more about delegation sets in [AWS docs](http://docs.aws.amazon.com/Route53/latest/APIReference/actions-on-reusable-delegation-sets.html).