Skip to content

Terminology

This page defines the terms used throughout the Boilerplate documentation. Using these terms consistently helps avoid confusion, especially when Boilerplate is used alongside tools like Terragrunt that have their own vocabulary.

A directory containing a boilerplate.yml configuration file and one or more files with Go template syntax. Templates are the core unit in Boilerplate — everything starts with a template.

my-template/
├── boilerplate.yml
├── README.md
└── main.go

A template is referenced by its path using --template-url:

Terminal window
boilerplate --template-url ./my-template --output-folder ./output

A named value declared in boilerplate.yml that gets substituted into template files during rendering. Variables have a name, type, and optional default. Boilerplate supports seven variable types: string, int, float, bool, list, map, and enum.

variables:
- name: ProjectName
type: string
description: The name of the project

Variables are referenced in template files with {{ .ProjectName }}.

A reference to another template that runs as part of the current template. Dependencies are declared in boilerplate.yml and let you compose larger templates from smaller, reusable ones.

dependencies:
- name: backend
template-url: ../go-service
output-folder: ./backend

The template being referenced by a dependency is still called a template — not a “module.” When you need to distinguish between the two, use parent template (the one declaring the dependency) and child template (the one being pulled in).

The term “module” is intentionally avoided in Boilerplate’s vocabulary because it conflicts with OpenTofu/Terraform modules, which are a common target for Boilerplate-generated code. When someone says “module” in the context of infrastructure-as-code, it almost always means an OpenTofu/Terraform module. Calling Boilerplate’s dependencies “modules” would create ambiguity, especially when using Boilerplate with Terragrunt Scaffold, which generates configurations for OpenTofu/Terraform modules.

Use template or dependency instead.

A shell command that runs before or after template rendering. Hooks are useful for formatting generated code, installing dependencies, or running validation.

hooks:
before:
- command: echo
args: ["Generating files..."]
after:
- command: gofmt
args: ["-w", "."]

A reusable template fragment that can be included in multiple template files using the Go template {{ template }} action. Partials are declared in boilerplate.yml and help avoid duplicating common template logic.

The directory where Boilerplate writes rendered files, specified with --output-folder. The output folder mirrors the structure of the template directory, with all Go template expressions resolved.

The path or URL to a template directory, specified with --template-url. This can be a local file path, a Git repository URL, an S3/GCS path, or any URL supported by go-getter. See Remote Templates for details.

TermDefinition
TemplateA directory with a boilerplate.yml and template files
VariableA named, typed value substituted into templates
DependencyA reference to a child template that runs as part of a parent
Parent templateThe template that declares dependencies
Child templateThe template referenced by a dependency
HookA shell command that runs before or after rendering
PartialA reusable template fragment included via {{ template }}
Output folderThe directory where rendered files are written
Template URLThe path or URL to a template directory