oraclecloud

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: UPL-1.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Oracle Cloud Infrastructure DNS Provider for Caddy-DNS

This package provides an OCI DNS provider module for Caddy backed by github.com/Djelibeybi/libdns-oraclecloud.

Caddy module name

dns.providers.oraclecloud

Building

Build Caddy with:

xcaddy build --with github.com/Djelibeybi/caddy-dns-oraclecloud

This module currently requires Go 1.25 or newer because the pinned Caddy and libdns-oraclecloud versions both require it.

Configuration

The wrapper exposes the underlying libdns-oraclecloud provider fields directly. Supported auth modes are:

  • auto or empty
  • api_key
  • config_file
  • environment
  • instance_principal

auto is the default and follows the provider's own precedence order:

  1. Explicit API key fields on the module
  2. OCI config file credentials
  3. OCI_CLI_* environment variables

For private zones accessed by name, Oracle Cloud requires both scope PRIVATE and view_id <ocid>.

JSON example
{
  "module": "acme",
  "challenges": {
    "dns": {
      "provider": {
        "name": "oraclecloud",
        "auth": "config_file",
        "config_file": "{env.OCI_CLI_CONFIG_FILE}",
        "config_profile": "{env.OCI_CLI_PROFILE}",
        "region": "{env.OCI_CLI_REGION}"
      }
    }
  }
}
Caddyfile examples

Using an OCI config file:

tls {
	dns oraclecloud {
		auth config_file
		config_file {env.OCI_CLI_CONFIG_FILE}
		config_profile {env.OCI_CLI_PROFILE}
		region {env.OCI_CLI_REGION}
	}
}

Using direct API key fields:

tls {
	dns oraclecloud {
		auth api_key
		tenancy_ocid {env.OCI_CLI_TENANCY}
		user_ocid {env.OCI_CLI_USER}
		fingerprint {env.OCI_CLI_FINGERPRINT}
		private_key_path {env.OCI_CLI_KEY_FILE}
		private_key_passphrase {env.OCI_CLI_PASSPHRASE}
		region {env.OCI_CLI_REGION}
	}
}

Using a private zone by name:

tls {
	dns oraclecloud {
		auth config_file
		config_file {env.OCI_CLI_CONFIG_FILE}
		config_profile DEFAULT
		scope PRIVATE
		view_id ocid1.dnsview.oc1..exampleuniqueID
	}
}

Available Caddyfile options

oraclecloud [<auth_mode>] {
    auth <auth_mode>
    config_file <path>
    config_profile <profile>
    private_key <pem>
    private_key_path <path>
    private_key_passphrase <passphrase>
    tenancy_ocid <ocid>
    user_ocid <ocid>
    fingerprint <fingerprint>
    region <region>
    scope <GLOBAL|PRIVATE>
    view_id <ocid>
    compartment_id <ocid>
}

All string fields support Caddy placeholders such as {env.OCI_CLI_REGION}.

Notes

  • compartment_id is only needed if you use the underlying provider's ListZones capability; it is not required for standard ACME DNS challenge flows.
  • For authentication details and provider behavior, see the libdns-oraclecloud README.

Versioning

This repository uses Release Please with conventional commits to automate changelog entries, release PRs, Git tags, and GitHub Releases.

  • fix: commits produce patch releases
  • feat: commits produce minor releases
  • feat!: or commits with a BREAKING CHANGE: footer produce major releases

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{ *libdnsoraclecloud.Provider }

Provider wraps the libdns Oracle Cloud provider as a Caddy module.

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 resolves placeholders before the provider is used.

func (*Provider) UnmarshalCaddyfile

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

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

oraclecloud [<auth_mode>] {
    auth <auth_mode>
    config_file <path>
    config_profile <profile>
    private_key <pem>
    private_key_path <path>
    private_key_passphrase <passphrase>
    tenancy_ocid <ocid>
    user_ocid <ocid>
    fingerprint <fingerprint>
    region <region>
    scope <GLOBAL|PRIVATE>
    view_id <ocid>
    compartment_id <ocid>
}

If auth is omitted, the underlying libdns provider defaults to "auto".

Jump to

Keyboard shortcuts

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