GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
COREDNS-IMPORT(7) CoreDNS Plugins COREDNS-IMPORT(7)

import - includes files or references snippets from a Corefile.

The import plugin can be used to include files into the main configuration. Another use is to reference predefined snippets. Both can help to avoid some duplication.

This is a unique plugin in that import can appear outside of a server block. In other words, it can appear at the top of a Corefile where an address would normally be.

import PATTERN

PATTERN is the file, glob pattern (*) or snippet to include. Its contents will replace this line, as if that file's contents appeared here to begin with.

You can use import to include a file or files. This file's location is relative to the Corefile's location. It is an error if a specific file cannot be found, but an empty glob pattern is not an error.

You can define snippets to be reused later in your Corefile by defining a block with a single-token label surrounded by parentheses:

(mysnippet) {
    ...
}

Then you can invoke the snippet with import:

import mysnippet

Import a shared configuration:

. {
   import config/common.conf
}

Where config/common.conf contains:

prometheus
errors
log

This imports files found in the zones directory:

import ../zones/*

See corefile(5).

March 2021 CoreDNS

Search for    or go to Top of page |  Section 7 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.