Converts an input CSV file from route53-transfer to a JSON file which can be then used in a Terraform google_dns_record_set
Project description
Route53 recordset converter
This software is aimed to convert the input CSV file from route53-transfer to a JSON file which can be then used in a Terraform google_dns_record_set
Requirements
- Python 3.7.9 or higher
Installation
pip install route53-recordset-converter
Usage
- Dump AWS Route 53 Hosted Zone records to a CSV using route53-transfer
route53-transfer dump example.com example.com.csv
- Convert the CSV file to a JSON one
route53-recordset-converter example.com.csv example.com.json
- Use the JSON in Terraform
locals {
dns_records = jsondecode(file("example.com.json"))
}
resource "google_dns_record_set" "dns_records" {
for_each = { for index, dns_record in local.dns_records : index => dns_record }
name = each.value.name
managed_zone = "dns-zone-name"
type = each.value.type
ttl = each.value.ttl
rrdatas = each.value.value
}
CSV Formats
The following CSV formats are supported:
aws
: AWS Route 53 standard format, as outputted byroute53-transfer
register.it
: Register.it format, as exported by www.register.it
In Python
You can convert the CSV without dumping them to a JSON.
from route53_recordset_converter import Route53RecordsetConverter
c = Route53RecordsetConverter()
converted_results = c.convert("example.com.csv")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for route53-recordset-converter-0.2.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f9f750f1da84d488484bbac7cfa874c9cad0ca7f6d316b6fd5a14a1909b0e95 |
|
MD5 | 213b834afa13ec44dec128bee822815d |
|
BLAKE2b-256 | ac345b33160be1f435c8dc530eab4710d5f95d38e4431ce4c6b5872ec0be8ece |
Close
Hashes for route53_recordset_converter-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c762ad280238777a9819f553b0c30655a4fc0e8be12a86849a08d6d5315ff657 |
|
MD5 | 4de7433167ac98111b1ce5d7643335db |
|
BLAKE2b-256 | 1daef5f3c0c439e8c35b94a45850b447328b76a3e2697c47abbf30782de4b128 |