Skip to content

Convert a DNS zone file to Terraform AWS Route 53 configuration

License

Notifications You must be signed in to change notification settings

docsend/zone2tf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

zone2tf

A script to convert a Bind-compatible DNS zone file to Terraform AWS Route53 configuration.

This script is quick, dirty and will not handle all use cases. Use it as a starting point.

Usage

$ git clone https://github.com/releaseworks/zone2tf.git
$ cd zone2tf/
$ python zone2tf.py my_zone.txt

resource "aws_route53_zone" "myzone-com" {
  name = "myzone.com"
}

resource "aws_route53_record" "wwwmyzonecom-a" {
  zone_id = "${aws_route53_zone.myzone-com.id}"
  name    = "www"
  type    = "A"
  records = ["127.0.0.1"]
  ttl     = 3600
}
...

To redirect to a file:

python zone2tf.py my_zone.txt > route53.tf

About

Convert a DNS zone file to Terraform AWS Route 53 configuration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 72.8%
  • Shell 27.2%