This repo contains a Terraform module that manages an AWS Route53 Zone and its simple routing policy records.
- Manage AWS Route53 hosted zone
- Add/remove AWS Route53 records on the specified hosted zone
module dns {
source = "CodewaySA/dns/aws"
version = "1.0.1"
records = [
#[ "name", "type", TTL, [ "value" ]]
[ "", "A", 600, [ "123.123.123.123" ]],
[ "record01", "CNAME", 600, [ "example.aws.example.com." ]],
[ "record02", "A", 600, [ "143.204.9.89" ]]
]
}
output "aws_ns_records" {
value = module.dns.aws_zone_ns
description = "NS records for hosted zone"
}
The records output from aws_ns_records must be added to the parent DNS Zone
Name | Version |
---|---|
terraform | >= 1.2.9 |
aws | ~> 4.41 |
Name | Version |
---|---|
aws | ~> 4.41 |
No modules.
Name | Type |
---|---|
aws_route53_record.aws_zone | resource |
aws_route53_record.records | resource |
aws_route53_zone.aws_zone | resource |
aws_route53domains_registered_domain.aws_zone | resource |
aws_caller_identity.current | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
dns_zone | AWS hosted zone name | string |
n/a | yes |
is_it_a_registered_domain | Is the specified domain an AWS registered domain? | bool |
false |
no |
records | DNS records | list(any) |
[] |
no |
Name | Description |
---|---|
aws_zone_id | hosted zone ID |
aws_zone_ns | NS records for hosted zone |