This Terraform module creates Route53 hosted zones in AWS.
- Support for both public and private hosted zones
- Multiple zones can be created at once using a map
- VPC associations for private hosted zones
- Configurable zone parameters (comments, delegation sets, etc.)
- Comprehensive tagging support
module "zones" {
source = "Senora-dev/route53-zone/aws"
zones = {
"example.com" = {
comment = "Public zone for example.com"
tags = {
Environment = "production"
}
}
}
tags = {
Terraform = "true"
}
}
module "zones" {
source = "path/to/terraform-aws-route53-zones"
zones = {
"internal.example.com" = {
comment = "Private zone for internal.example.com"
vpc = [{
vpc_id = "vpc-12345678"
}]
tags = {
Environment = "production"
}
}
}
}
module "zones" {
source = "path/to/terraform-aws-route53-zones"
zones = {
"example.com" = {
comment = "Public zone for example.com"
}
"internal.example.com" = {
comment = "Private zone for internal.example.com"
vpc = [{
vpc_id = "vpc-12345678"
}]
}
}
tags = {
Terraform = "true"
Environment = "production"
}
}
Name | Version |
---|---|
terraform | >= 1.0 |
aws | >= 4.0 |
Name | Version |
---|---|
aws | >= 4.0 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
zones | Map of Route53 zone parameters | map(object({...})) |
n/a | yes |
tags | Tags to apply to all resources | map(string) |
{} |
no |
The zones
variable accepts a map of zone names to zone configurations. Each zone configuration can include:
comment
- (Optional) A comment for the hosted zonedelegation_set_id
- (Optional) The ID of the reusable delegation setforce_destroy
- (Optional) Whether to destroy all records in the zone when destroying the zonevpc
- (Optional) Configuration block(s) for VPC associationvpc_id
- The VPC ID to associate withvpc_region
- (Optional) The VPC's region (defaults to the current region)
tags
- (Optional) A map of tags to assign to the zone
Name | Description |
---|---|
route53_zone_zone_id | Map of zone names to zone IDs |
route53_zone_name_servers | Map of zone names to name servers |
route53_zone_name | Map of zone names to zone names |
Examples are available in the examples
directory:
complete
- A complete example showing all featurespublic-zones
- Example of public hosted zonesprivate-zones
- Example of private hosted zones with VPC association
Module created and maintained by [Your Name]
Apache 2 Licensed. See LICENSE for full details.
This module is maintained by Senora.dev.