Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
COREDNS-IMPORT(7)		 CoreDNS Plugins	       COREDNS-IMPORT(7)

NAME
     import - includes files or references snippets from a Corefile.

DESCRIPTION
     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 ad-
     dress would normally be.

SYNTAX
	    import PATTERN

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

     Corefile may contain at most 10000 import statements. A glob pattern counts
     as a single import. The limit protects the configuration from recursive im-
     ports.

FILES
     You can use import to include a file or files. This file's location is rel-
     ative 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.

SNIPPETS
     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

EXAMPLES
     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 ALSO
     See corefile(5).

CoreDNS 			   March 2026		       COREDNS-IMPORT(7)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=coredns-import&sektion=7&manpath=FreeBSD+Ports+15.1.quarterly>

home | help