Skip to content

CodewaySA/terraform-aws-dns

Repository files navigation

Terraform-aws-dns-terraform-module repository

This repo contains a Terraform module that manages an AWS Route53 Zone and its simple routing policy records.

Features

  • Manage AWS Route53 hosted zone
  • Add/remove AWS Route53 records on the specified hosted zone

Usage

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


Requirements

Name Version
terraform >= 1.2.9
aws ~> 4.41

Providers

Name Version
aws ~> 4.41

Modules

No modules.

Resources

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

Inputs

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

Outputs

Name Description
aws_zone_id hosted zone ID
aws_zone_ns NS records for hosted zone

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages