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-transferregister.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")
Release files for route53-recordset-converter 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| route53-recordset-converter-0.2.4.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| route53_recordset_converter-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:8.1 kB
Release files / route53-recordset-converter-0.2.4.tar.gz
| Download URL | route53-recordset-converter-0.2.4.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4d179621ade96ebd9df789ad34d3e16e47f846927cd847ebc928b1a0f2c2223
|
|
BLAKE2b-256 checksum How to use checksums |
0f14bf78342bb266202b50f258c929ba57f4754834bdf5ede0dc2b61d56b7df2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
|
Release files / route53_recordset_converter-0.2.4-py3-none-any.whl
| Download URL | route53_recordset_converter-0.2.4-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b1dedec5e7e5b582b216f757da6bafb4b5dfda3b63800e22ac8e296fa98b0a8
|
|
BLAKE2b-256 checksum How to use checksums |
5ea5c04684ccea2ca83e3945da40521a794b7440c9e9ffc872f267c522d4af34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
|