Skip to main content
Providers

HostedZone

A resource of the AWS provider, version 0.3.0, in its DNS group. Import it with:

import HostedZone from "aws/dns"

Example

resource HostedZone example {
    name        = "example-value"
    comment     = "example-value"
    privateZone = false
    vpcId       = "example-value"
    vpcRegion   = "example-value"
    tags        = "..."
}

Properties

Set by your code in the resource block. A required one must be set; any other you leave out takes the value under Default, if it has one.

NameTypeDefaultRequiredDescription
namestring—NoThe domain name for the hosted zone (e.g., 'example.com')
commentstring—NoA comment for the hosted zone
privateZonebooleanfalseNoWhether this is a private hosted zone
vpcIdstring—NoVPC ID to associate with private hosted zone
vpcRegionstring—NoVPC region for private hosted zone
tagsobject—NoTags to apply to the hosted zone

Set by AWS after the resource is created: your code can read them but not set them. An importable one identifies an existing resource.

NameTypeImportableDescription
hostedZoneIdstringNoThe hosted zone ID (without /hostedzone/ prefix)
nameServersany[]NoThe name servers for the hosted zone
resourceRecordSetCountnumberNoThe number of resource record sets in the hosted zone
callerReferencestringNoA unique string that identifies the request to create the zone
arnstringYesThe Amazon Resource Name (ARN) of the hosted zone

On this page