AWS Route 53 Zone Association
This page shows how to write Terraform and CloudFormation for Route 53 Zone Association and write them securely.
aws_route53_zone_association (Terraform)
The Zone Association in Route 53 can be configured in Terraform with the resource name aws_route53_zone_association
. The following sections describe 2 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_route53_zone_association" "seoul_attch" {
zone_id = aws_route53_zone.seoul_zone.zone_id
vpc_id = aws_vpc.seoul.id
}
resource "aws_route53_zone_association" "zone-associate" {
zone_id = var.INTERNAL_DNS_ZONE_ID
vpc_id = aws_vpc.main.id
Parameters
-
id
optional computed - string -
owning_account
optional computed - string -
vpc_id
required - string -
vpc_region
optional computed - string -
zone_id
required - string
Explanation in Terraform Registry
Manages a Route53 Hosted Zone VPC association. VPC associations can only be made on private zones. See the
aws_route53_vpc_association_authorization
resource for setting up cross-account associations.NOTE: Unless explicit association ordering is required (e.g., a separate cross-account association authorization), usage of this resource is not recommended. Use the
vpc
configuration blocks available within theaws_route53_zone
resource instead. NOTE: Terraform provides both this standalone Zone VPC Association resource and exclusive VPC associations defined in-line in theaws_route53_zone
resource viavpc
configuration blocks. At this time, you cannot use those in-line VPC associations in conjunction with this resource and the same zone ID otherwise it will cause a perpetual difference in plan output. You can optionally use the generic Terraform resource lifecycle configuration block withignore_changes
in theaws_route53_zone
resource to manage additional associations via this resource.
AWS::Route53::HostedZone HostedZoneConfig (CloudFormation)
The HostedZone HostedZoneConfig in Route53 can be configured in CloudFormation with the resource name AWS::Route53::HostedZone HostedZoneConfig
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
Comment
Any comments that you want to include about the hosted zone.
Required: No
Type: String
Maximum: 256
Update requires: No interruption
Explanation in CloudFormation Registry
A complex type that contains an optional comment about your hosted zone. If you don't want to specify a comment, omit both the
HostedZoneConfig
andComment
elements.
Frequently asked questions
What is AWS Route 53 Zone Association?
AWS Route 53 Zone Association is a resource for Route 53 of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS Route 53 Zone Association?
For Terraform, the dhlee011/AWS_Terraform and Polina-DevOps/Terraform-Mutable source code examples are useful. See the Terraform Example section for further details.