Skip to main content

terraform-named-cloudflare

Python module and tool to easily convert Bind9 (named) zones into Terraform CloudFlare provider records definitions.

This module parses Bind9 (named) zone file and generates Terraform code with CloudFlare resources definitions.

To make the result code organized, code separated based on DNS records types.

Installation

Production

The simplest way to install the module is to use PIP:

pip install terraform-named-cloudflare

Development

To install the module from sources, just clone the repository and install the module:

git clone https://github.com/pa-yourserveradmin-com/terraform-named-cloudflare.git
cd terraform-named-cloudflare
python3 setup.py install

Usage

Example usage scenario is the next:

terraform-named-cloudflare \
    --file <NAMED_ZONE_FILE> \
    --zone-id <CLOUDFLARE_ZONE_ID> \
    --zone-name <CLOUDFLARE_ZONE_NAME>

Where:

  • NAMED_ZONE_FILE - the absolute or relative path to zone file in Bind9 (named) format.
  • CLOUDFLARE_ZONE_ID - the optional CloudFlare zone ID (can be found in CloudFlare WEB interface).
  • CLOUDFLARE_ZONE_NAME - the optional CloudFlare zone name (the same as domain name).

Since not all records need to be converted in Terraform code, the script ignores some of them and just prints ignored records to standard output to provide ability review them and add manually.

Requirements

There are no specific requirements except a few weel-known and widelly used Python modules listed in the requirements.txt and automatically installed with module.

Limitations

The module does not understand DNS RRD records and always will create only one resource with the same name. The rest will be ignored and printed to standard output for review and manual changes in Terraform code.

Supported DNS records types

Currently this module supports the next types of DNS records:

  • A
  • AAAA
  • CNAME
  • MX
  • SRV
  • TXT

Other types of DNS records can be added based on the need. Also, contrinutions are always welcome.

Metadata

Release files for terraform-named-cloudflare 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for terraform-named-cloudflare 0.0.2
File Size Uploaded Provenance Actions
terraform_named_cloudflare-0.0.2.tar.gz 5.8 kB Without provenance Details for terraform_named_cloudflare-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for terraform-named-cloudflare 0.0.2
File Interpreter ABI Platform Actions
terraform_named_cloudflare-0.0.2-py3-none-any.whl Python 3 none any Details for terraform_named_cloudflare-0.0.2-py3-none-any.whl

Total release size: 13.8 kB

Release files / terraform_named_cloudflare-0.0.2.tar.gz

Download URL terraform_named_cloudflare-0.0.2.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
69a4bec9766ee6229aef7a4c1efc4424dedb0e25bdc2fdb7be12f2270f4011a0
BLAKE2b-256 checksum
How to use checksums
193c51821d1387827b5334d58f41ffd8596a86228cbdd36955a03a71c07c2c39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.1

Release files / terraform_named_cloudflare-0.0.2-py3-none-any.whl

Download URL terraform_named_cloudflare-0.0.2-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b731187eaeaf9afb47a1a3f54a988d594fba0e5fbd119fc1b1d057db16cc9c7
BLAKE2b-256 checksum
How to use checksums
eb07cbd41b1020c7090db4850df56a9e71c15c1562fb9ff64420307c3d8f0923
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.1

Security for terraform-named-cloudflare 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page