https://github.com/launchbynttdata/tf-aws-module_primitive-route53_record
https://github.com/launchbynttdata/tf-aws-module_primitive-route53_record
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/launchbynttdata/tf-aws-module_primitive-route53_record
- Owner: launchbynttdata
- License: apache-2.0
- Created: 2026-03-31T18:40:57.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-04-07T18:45:48.000Z (3 months ago)
- Last Synced: 2026-04-07T19:25:46.326Z (3 months ago)
- Language: HCL
- Size: 110 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
- Notice: NOTICE
Awesome Lists containing this project
README
# tf-aws-module_primitive-route53_record
Terraform primitive module for a single [`aws_route53_record`](https://registry.terraform.io/providers/hashicorp/aws/5.100.0/docs/resources/route53_record).
## Overview
This module wraps one Route 53 resource record set. It supports simple records (`ttl` + `records`), alias targets, and optional routing policies (weighted, failover, geolocation, geoproximity, latency, CIDR, multivalue answer).
## Usage
### Simple record
```hcl
module "www" {
source = "path/to/module"
zone_id = aws_route53_zone.primary.zone_id
name = "www"
type = "A"
ttl = 300
records = ["203.0.113.10"]
}
```
### Complete example with routing policy
```hcl
module "www_latency" {
source = "path/to/module"
zone_id = aws_route53_zone.primary.zone_id
name = "www"
type = "A"
ttl = 300
records = ["203.0.113.10"]
set_identifier = "us-east-1"
latency_routing_policy = {
region = "us-east-1"
}
}
```
See [`examples/complete`](examples/complete) for a full working example with all supported variables.
## Provider configuration
Configure the AWS provider in the root module. This repository’s `examples/complete` expects a generated `provider.tf` from the standard Makefile workflow.
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | ~> 1.10 |
| [aws](#requirement\_aws) | >= 5.0, < 7.0 |
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | 6.39.0 |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_route53_record.record](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [alias](#input\_alias) | Alias target (e.g. ELB, CloudFront). When set, do not set ttl or records.
The inner `name` is the DNS name to point to (e.g. load balancer DNS name). |
object({
name = string
zone_id = string
evaluate_target_health = optional(bool, false)
}) | `null` | no |
| [allow\_overwrite](#input\_allow\_overwrite) | Allow overwriting an existing record set with the same name and type. | `bool` | `false` | no |
| [cidr\_routing\_policy](#input\_cidr\_routing\_policy) | CIDR (IP-based) routing policy block. | object({
collection_id = string
location_name = optional(string)
}) | `null` | no |
| [failover\_routing\_policy](#input\_failover\_routing\_policy) | Failover routing policy block. | object({
type = string
}) | `null` | no |
| [geolocation\_routing\_policy](#input\_geolocation\_routing\_policy) | Geolocation routing policy block. | object({
continent = optional(string)
country = optional(string)
subdivision = optional(string)
}) | `null` | no |
| [geoproximity\_routing\_policy](#input\_geoproximity\_routing\_policy) | Geoproximity routing policy block. | object({
aws_region = optional(string)
bias = optional(number)
local_zone_group = optional(string)
coordinates = optional(list(object({
latitude = string
longitude = string
})))
}) | `null` | no |
| [health\_check\_id](#input\_health\_check\_id) | Health check ID to associate with alias, weighted, or failover routing. | `string` | `null` | no |
| [latency\_routing\_policy](#input\_latency\_routing\_policy) | Latency routing policy block. | object({
region = string
}) | `null` | no |
| [multivalue\_answer\_routing\_policy](#input\_multivalue\_answer\_routing\_policy) | Set to true for multivalue answer routing. | `bool` | `null` | no |
| [name](#input\_name) | DNS domain name for the record (relative to the zone or fully qualified). | `string` | n/a | yes |
| [records](#input\_records) | String records for non-alias records (e.g. IPv4 for A, text for TXT). | `list(string)` | `null` | no |
| [set\_identifier](#input\_set\_identifier) | Unique identifier for weighted, latency, geolocation, or failover routing. | `string` | `null` | no |
| [timeouts](#input\_timeouts) | Create, update, and delete timeouts for the record set change. | object({
create = optional(string)
update = optional(string)
delete = optional(string)
}) | `null` | no |
| [ttl](#input\_ttl) | TTL of the record in seconds. Omit when using an alias record. | `number` | `null` | no |
| [type](#input\_type) | DNS record type. | `string` | n/a | yes |
| [weighted\_routing\_policy](#input\_weighted\_routing\_policy) | Weighted routing policy block. | object({
weight = number
}) | `null` | no |
| [zone\_id](#input\_zone\_id) | The ID of the hosted zone that contains this resource record set. | `string` | n/a | yes |
## Outputs
| Name | Description |
|------|-------------|
| [fqdn](#output\_fqdn) | The FQDN built from the record name and zone (trailing dot omitted). |
| [id](#output\_id) | The Route 53 record set ID (hosted zone ID, record name, and type). |
| [name](#output\_name) | The name of the record. |
| [type](#output\_type) | The DNS record type. |
## License
See [LICENSE](LICENSE).