Skip to main content

octodns-nested-zones

Nested zone source for octoDNS.

Combines records from a source zone and its configured sub-zones into a single zone. This is useful when an upstream provider (e.g. AXFR) is limited to a single zone at a time but you need to sync records from multiple zones into a target that does not support zones on subdomains.

Motivation

Providers like AXFR (zone transfer) are scoped to one zone. If you have delegated sub-domains managed in separate zones (e.g. sub1.example.com, sub2.example.com), a plain AXFR source for example.com will only see records from the example.com zone itself - it would not include the records that live in the sub-zone files.

This source wraps another source (like AXFR) and:

  1. Fetches records for the primary zone
  2. Fetches records for each configured sub-zone
  3. Merges everything into a single combined zone

The merged zone can then be synced to any target provider that doesn't understand or cares about zone boundaries.

Installation

pip install octodns-nested-zones

Configuration

Use a YAML anchor to share the inner source configuration:

providers:
  axfr: &axfr
    class: octodns.source.axfr.AxfrSource
    host: ns1.example.com
    key: env/AXFR_KEY

  nested:
    class: octodns_nested_zones.NestedSource
    source: *axfr
    sub_zones:
      - sub1
      - sub2

zones:
  example.com.:
    sources:
      - nested
    targets:
      - your_dns_provider

Each entry in sub_zones is relative to the primary zone - e.g. sub1 resolves to sub1.example.com. when populating the example.com. zone.

How it works

On each sync cycle, the source:

  1. Calls the inner source's populate() for the primary zone
  2. For each sub-zone, creates a temporary Zone, calls the inner source's populate(), then copies the records into the primary zone with their full qualified names (e.g. a record app from the sub1.example.com. zone becomes app.sub1 in example.com.)
  3. All records (primary and sub-zone) end up in the same zone

Development

# Install dependencies
uv sync --group dev

# Run tests
uv run pytest

Releasing

  1. Update CHANGELOG.md — move the new version's entry from - unreleased to a date and add any missing items.
  2. Commit and push to main.
  3. Tag the release: git tag 0.2.0 && git push --tags.

CI will run the test suite, build the package, create a GitLab Release with the changelog section, and publish to PyPI.

Changes

See CHANGELOG.md for release history.

License

MIT

Metadata

Release files for octodns-nested-zones 0.3.0

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

Source distribution (sdist)

Source distribution for octodns-nested-zones 0.3.0
File Size Uploaded Provenance Actions
octodns_nested_zones-0.3.0.tar.gz 65.0 kB Without provenance Details for octodns_nested_zones-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for octodns-nested-zones 0.3.0
File Interpreter ABI Platform Actions
octodns_nested_zones-0.3.0-py3-none-any.whl Python 3 none any Details for octodns_nested_zones-0.3.0-py3-none-any.whl

Total release size: 71.5 kB

Release files / octodns_nested_zones-0.3.0.tar.gz

Download URL octodns_nested_zones-0.3.0.tar.gz
Size 65.0 kB
Tags Source
SHA-256 checksum
How to use checksums
936eba8f435add09760d07d90bde25e5d074eb5c87516a11f964331d44f0b504
BLAKE2b-256 checksum
How to use checksums
8d1281b562a1b22ea020b62381f2f22b7e05425824deb3b2d141a709abf9797b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / octodns_nested_zones-0.3.0-py3-none-any.whl

Download URL octodns_nested_zones-0.3.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9f4117f65807be74f271ba975d24331a051c4eb70e81a8e74feda08462e1dd4
BLAKE2b-256 checksum
How to use checksums
b49e2b935851a6caa1f0c8111180c8f31ca452762a05b22b0070d673c004c17b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for octodns-nested-zones 0.3.0

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.3.0 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