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
}
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.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70012851c01aaeb4ef5d13ff1ff0a4cde337501948d29a78c0cc00cc5c248e16 |
|
MD5 | 4b877dea8ef0117325302c49567f6c99 |
|
BLAKE2b-256 | c624b08563b84c29e3860dd8459e104a9f5c2736bac7d7b0e1a53b28364f3e9d |
Close
Hashes for route53_recordset_converter-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8da333ec7c87afd8f45f803bc4081d67bbfe47c77b862770cbb3365f713be1e0 |
|
MD5 | 0bcae80e84da88cbb000f7bd2d1140c1 |
|
BLAKE2b-256 | 01fbe45cc6334e43fdbaf22fa0980916905859e3e245ac6273208497f682a76e |