hosted-zone resource¶
Description¶
HostedZoneResource manages a Route 53 hosted zone: a DNS namespace, either public or private. The name and the reusable delegation set are fixed at creation, so a change to either replaces the zone; the comment, the tags, and the VPC associations reconcile in place. Associating any VPC makes the zone private, and there is no flag to flip a zone between public and private, so the set of VPCs is what decides the kind. ForceDestroy is a delete-time switch: when it is set, the zone's own records are purged before the zone is deleted, since Route 53 refuses to delete a zone that still holds records.
Source: internal/service/route53/hosted_zone_rsrc.go:33
Example usage:
imports: {
aws-route53: 'github.com/cloudboss/unobin-library-aws//service/route53'
}
resources: {
example: aws-route53.hosted-zone {
# Set input fields here.
}
}
Inputs¶
name
string
comment
optional(string)
delegation-set-id
optional(string)
vpcs
optional(list(object))
optional(
list(
object({
vpc-id: string
vpc-region: optional(string)
})
)
)
force-destroy
optional(boolean)
tags
optional(map(string))
Input Constraints¶
Delegation set id rules
delegation-set-id and vpcs are mutually exclusive.
Rule logic
- Require
input.delegation-set-id == null
|| !(@core.length(input.vpcs ?? []) >= 1)
Vpcs rules
a vpc association requires a vpc-id.
Rule logic
- For each
input.vpcs ?? []- Require
@core.length(@each.value.vpc-id) >= 1
Outputs¶
zone-id
string
arn
string
name
string
name-servers
list(string)
primary-name-server
string