1.1 KiB
1.1 KiB
layout | page_title | sidebar_current | description |
---|---|---|---|
aws | AWS: aws_route53_zone | docs-aws-resource-route53-zone | Provides a Route53 Hosted Zone resource. |
aws_route53_zone
Provides a Route53 Hosted Zone resource.
Example Usage
resource "aws_route53_zone" "primary" {
name = "example.com"
}
For use in subdomains, note that you need to create a
aws_route53_record
of type NS
as well as the subdomain
zone.
resource "aws_route53_zone" "main" {
name = "example.com"
}
resource "aws_route53_zone" "dev" {
name = "dev.example.com"
parent_route53_zone = "${aws_route53_zone.main.zone_id}"
}
resource "aws_route53_record" "dev-ns" {
zone_id = "${aws_route53_zone.main.zone_id}"
name = "dev.example.com"
type = "NS"
ttl = "30"
records = ["127.0.0.1", "127.0.0.27"]
}
Argument Reference
The following arguments are supported:
name
- (Required) This is the name of the hosted zone.
Attributes Reference
The following attributes are exported:
zone_id
- The Hosted Zone ID. This can be referenced by zone records.