include

includeSTRINGfilename;

Available inall subroutines.

Inserts the contents of the specified VCL file at the current line.

include "secondary-vcl-file";

You may upload more than one custom VCL file in a Fastly service configuration, but one must be marked as the main file, which is the default setting of the main field for the first VCL file you upload. Fastly will compile the main VCL file, and will ignore all others unless they are explicitly included.

The name of the file being included must match the value that was specified in the name field when the included content was uploaded.

The include statement does not create scope. Including a file is equivalent to concatenating the files together.

Included VCL files are part of the versioned set of configuration. While a common use case for inclusions is to separate out code that changes more frequently than other code, it is still necessary to clone the entire service configuration in order to update any one VCL file. If you want to be able to update a chunk of VCL without versioning the service, consider using dynamic VCL snippets.