Skip to main content

Lexicon provider for OctoDNS

Project description

Build Status

octodns-lexicon

Use Lexicon providers in OctoDNS

Introduction

octodns_lexicon is a provider for OctoDNS which by acting as a wrapper, it lets you to use Lexion providers in OctoDNS and thus you can manage your DNS records as code across even more providers.

Getting started

Extra dependencies

Some providers has extra dependencies. These are not installed by default.

See here for instructions on how to install extra dependencies for such providers.

Config

From OctoDNS, this provider can be configured pretty much like any other,

  • class: octodns_lexicon.LexiconProvider
  • raise_on_unknown: if True, raise RuntimeError on unhandled record types (default False)
  • lexicon_config: lexicon config. This dictionary gets sent staight into the wrapped Lexicon provider as a DictConfigSource

Furthermore: this provider also uses the Lexicon EnvironmentConfigSource, so that you can put your lexicon dns providers settings into environment variables, just like in Lexicon.

Example Configuration

 provider:
     gandi:
         class: octodns_lexicon.LexiconProvider
         lexicon_config:
             provider_name: gandi
             domain: blodapels.in
             gandi:
                 auth_token: "better kept in environment variable"
                 api_protocol: rest
                 
      namecheap:
          class: octodns_provider.LexiconProvider
          lexicon_config:
              provider_name: namecheap
              domain: example.com
              namecheap:
                  auth_sandbox: True
                  auth_username: foobar
                  auth_client_ip: 127.0.0.1
                  auth_token: "better kept in environment variable"

Some words of caution.

On Lexicon providers

Some Lexicon providers is not well suited for use in OctoDNS. For example, not all providers support updating TTL, some do not handle multi value records. Others yet might have other unknown shortcomings which makes them unsuitable.

Because of the sheer amount of providers available for Lexicon, it is very hard to test them all and therefore, some sandboxing is recommended before committing to using OctoDNS with a particular LexiconProvider.

A good test case can be creating a multi-value A record (or whichever, really), and then to applying it with OctoDNS multiple times. Only the first run should apply any changes.

Second step could be to change some of the values for that record, and maybe add one or two values, but keep some intact, and then change TTL and apply that a couple of times. Only the first run should apply any changes.

On native OctoDNS providers

If there is a native OctoDNS provider available for a particular provider, then it is advisable to use that one and to not use the wrapped Lexicon equivalent, because some OctoDNS providers handle their DNS updates in atomic transactions, and others has geo DNS support. Also some providers handle updating a multi value record as a single operation whereas octodns_lexicon performs an update/create/create+delete per value.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

octodns_lexicon-0.1.dev1.tar.gz (6.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page