googleclouddns

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 3 Imported by: 0

README

Google Cloud DNS module for Caddy

This package contains a DNS provider module for Caddy. It can be used to manage DNS records in Google Cloud DNS zones.

Caddy module name

dns.providers.googleclouddns

Authenticating

See the associated README in the libdns package for important information about credentials.

Building

To compile this Caddy module, follow the steps describe at the Caddy Build from Source instructions and import the github.com/caddy-dns/googleclouddns plugin

Config examples

To use this module for the ACME DNS challenge, configure the ACME issuer in your Caddy JSON like so:

{
  "module": "acme",
  "challenges": {
    "dns": {
      "provider": {
        "name": "googleclouddns",
        "gcp_project": "{env.GCP_PROJECT}",
      }
    }
  }
}

or with the Caddyfile:

tls {
  dns googleclouddns {
    gcp_project {$GCP_PROJECT}
  }
}

You can replace {$*} or {env.*} with the actual values if you prefer to put it directly in your config instead of an environment variable.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{ *libgoogleclouddns.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:

googleclouddns {
    gcp_project <project ID>
    gcp_application_default <path to service account JSON (optional)>
}

Jump to

Keyboard shortcuts

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