bunny

package module
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2024 License: MIT Imports: 4 Imported by: 0

README

Bunny.net module for Caddy

This package contains a DNS provider module for Caddy. It can be used to manage DNS records with Bunny.net accounts.

Examples

tls {
  acme_dns bunny {
    access_key {env.BUNNY_API_KEY}
    zone {env.BUNNY_ZONE}
  }

  propagation_timeout -1
}
{env.APP_DOMAIN} {
  tls {
    dns bunny {
      access_key {env.BUNNY_API_KEY}
      zone {env.BUNNY_ZONE}
    }

    propagation_timeout -1
  }
}

Replace {env.BUNNY_API_KEY} or {env.BUNNY_ZONE} with actual values if preferred. Not providing a zone will make Bunny.net look for a zone named _acme-challenge.{env.APP_DOMAIN}. Similarly, propagation_timeout -1 is required.

Remember to update your zone when declaring dns_challenge_override_domain because of a CNAME record.

Authenticating

To authenticate you need to provide a Bunny.net API Key.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{ *bunny.Provider }

Provider lets Caddy read and manipulate DNS records hosted by this DNS provider.

func (Provider) CaddyModule

func (Provider) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*Provider) Provision

func (p *Provider) Provision(ctx caddy.Context) error

Provision sets up the module. Implements caddy.Provisioner.

func (*Provider) UnmarshalCaddyfile

func (p *Provider) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile sets up the DNS provider from Caddyfile tokens. Syntax:

bunny {
    access_key <access_token>
    zone <zone>
}

Expansion of placeholders in the API token is left to the JSON config caddy.Provisioner (above).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL