
terraform-aws-arc-route53¶
Module:
sourcefuse/arc-route53/awsRegistry: https://registry.terraform.io/modules/sourcefuse/arc-route53/aws
Category: Networking / DNS
Source: https://github.com/sourcefuse/terraform-aws-arc-route53
Overview¶
Manages Route53 hosted zones and DNS records (A, CNAME, MX, TXT, alias) with health check associations.
What It Does¶
- Public and private hosted zone creation
- A, AAAA, CNAME, MX, TXT, NS, and alias records
- Health check association for failover routing
- Weighted, latency, and geolocation routing policies
- Route53 Resolver rules and endpoints
Quickstart¶
Private Hosted Zone¶
Alias Record (ALB)¶
Failover Routing with Health Checks¶
Examples¶
- Basic Public Zone - Simple public hosted zone with A and CNAME records
- Private Zone - Private hosted zone with VPC association
- Alias Records - ALB and CloudFront alias records
- Advanced Routing - Weighted, failover, latency, and geolocation routing
Usage¶
To see a full example, check out the main.tf file in the example folder.
Required Inputs¶
| Name | Type | Description |
|---|---|---|
name |
string |
Hosted zone domain name |
| ## Key Outputs |
| Name | Description |
|---|---|
zone_id |
Route53 hosted zone ID |
zone_arn |
Route53 hosted zone ARN |
name_servers |
List of name servers |
| ## Full Variable & Output Reference |
The complete inputs/outputs reference is auto-generated below.
Requirements¶
| Name | Version |
|---|---|
| terraform | >= 1.5.0 |
| aws | >= 5.0, < 7.0 |
Providers¶
| Name | Version |
|---|---|
| aws | 6.35.1 |
Modules¶
No modules.
Resources¶
| Name | Type |
|---|---|
| aws_route53_health_check.calculated | resource |
| aws_route53_health_check.cloudwatch | resource |
| aws_route53_health_check.endpoint | resource |
| aws_route53_hosted_zone_dnssec.this | resource |
| aws_route53_key_signing_key.this | resource |
| aws_route53_record.alias | resource |
| aws_route53_record.this | resource |
| aws_route53_vpc_association_authorization.this | resource |
| aws_route53_zone.this | resource |
| aws_route53_zone_association.secondary | resource |
| aws_region.current | data source |
| aws_route53_zone.existing | data source |
Inputs¶
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| comment | Comment for the hosted zone | string |
"Managed by Terraform" |
no |
| create_zone | Whether to create the Route 53 hosted zone | bool |
true |
no |
| delegation_set_id | ID of the reusable delegation set to associate with the zone | string |
null |
no |
| dnssec_kms_key_arn | ARN of KMS key for DNSSEC signing (must be in us-east-1) | string |
null |
no |
| dnssec_signing_key_name | Name for the DNSSEC key signing key | string |
null |
no |
| enable_accelerated_recovery | Enable Route 53 Accelerated Recovery (60-minute RTO for public zones) | bool |
null |
no |
| enable_dnssec | Enable DNSSEC signing for the hosted zone | bool |
false |
no |
| force_destroy | Whether to force destroy all records in the zone when deleting | bool |
false |
no |
| health_checks | Map of health checks to create | map(object({ |
{} |
no |
| name | Name of the Route 53 hosted zone | string |
n/a | yes |
| records | Map of DNS records to create | map(object({ |
{} |
no |
| secondary_vpcs | List of secondary VPCs to associate with the hosted zone | list(object({ |
[] |
no |
| tags | A map of tags to assign to resources | map(string) |
{} |
no |
| vpc_association_authorizations | VPC association authorizations for cross-account VPC associations | map(object({ |
{} |
no |
| vpc_id | VPC ID to associate with private hosted zone | string |
null |
no |
| vpc_region | VPC region (defaults to current region if not specified) | string |
null |
no |
| zone_tags | Additional tags specific to the hosted zone | map(string) |
{} |
no |
| zone_timeouts | Timeouts for zone operations | object({ |
null |
no |
| zone_type | Type of hosted zone (public or private) | string |
"public" |
no |
Outputs¶
| Name | Description |
|---|---|
| dnssec_key_signing_key_id | The ID of the DNSSEC key signing key |
| dnssec_key_signing_key_status | The status of the DNSSEC key signing key |
| dnssec_status | The status of DNSSEC for the hosted zone |
| health_check_arns | Map of health check names to their ARNs |
| health_check_ids | Map of health check names to their IDs |
| name_servers | List of name servers for the hosted zone |
| record_ids | Map of record names to their IDs |
| record_names | Map of record names to their FQDNs |
| zone_arn | The ARN of the hosted zone |
| zone_id | The hosted zone ID |
| zone_name | The name of the hosted zone |
Versioning¶
This project uses a .version file at the root of the repo which the pipeline reads from and does a git tag.
When you intend to commit to main, you will need to increment this version. Once the project is merged,
the pipeline will kick off and tag the latest git commit.
Development¶
Prerequisites¶
Configurations¶
- Configure pre-commit hooks
Versioning¶
while Contributing or doing git commit please specify the breaking change in your commit message whether its major,minor or patch
For Example
Tests¶
- Tests are available in
testdirectory - Configure the dependencies
- Now execute the test
Contributing¶
See CONTRIBUTING.md for commit conventions and development setup.
Authors¶
This project is authored by: - SourceFuse ARC Team