dns_cloudflare

package
v1.3.1-0...-3e602c1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: GPL-2.0 Imports: 10 Imported by: 0

README

Cloudflare DNS module

Maintained

About this module

This module allows automatically configuring the DNS settings for a domain.

Resources

None.

Configuration

API Token

Make sure to provide the API token for Cloudflare. You can generate an API token in your Cloudflare profile. Make sure to grant write permissions to DNS on Zone level.

modules_config:
  cloudflare:
    # scoped Cloudflare API token
    api_token: MY-API-TOKEN
    # switching safemode off will – during project destroy – remove all DNS entries on the domain
    disable_safemode: false
Domain setting

You'll also have to define the DNS provider to be used for each domain you want to set up in project definition:

domains:
  - domain: mydomain.com
    dns:
      provider: cloudflare

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDomain

func GetDomain(domain string) string

func GetSubdomain

func GetSubdomain(domain string) string

Types

type Module

type Module struct {
}

func (Module) Deploy

func (m Module) Deploy(_modulesSettings interface{}) error

func (Module) Destroy

func (m Module) Destroy(_modulesSettings interface{}) error

func (Module) GetConfig

func (Module) GetConfig() system.ModuleConfig

func (Module) GetTemplates

func (Module) GetTemplates() *embed.FS

func (Module) Init

func (Module) Init(moduleSettings interface{})

func (Module) Install

func (Module) Install(moduleSettings interface{}) error

type ModuleSettings

type ModuleSettings struct {
	ApiToken        string `json:"api_token"`
	DisableSafeMode bool   `json:"disable_safemode"`
}

Jump to

Keyboard shortcuts

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