Catalog
Terragruntâs catalog ecosystem provides two complementary tools for working with OpenTofu/Terraform modules:
- Catalog TUI â A terminal user interface for browsing and searching your module catalog.
- Scaffold â A command for generating
terragrunt.hclfiles from module templates.
You can use Scaffold standalone, or launch it directly from the Catalog TUI by pressing S on a selected module.
Security Configuration
Section titled âSecurity ConfigurationâThe catalog block supports security-related configuration options:
no_shell(bool): When set totrue, disables shell command execution in boilerplate templates during scaffolding. This is useful for organizations that want to prevent the use of shell commands in templates for security reasons.no_hooks(bool): When set totrue, disables hook execution in boilerplate templates during scaffolding. This is useful for organizations that want to prevent the use of hooks in templates for security reasons.
These configuration values can be overridden by their corresponding CLI flags:
terragrunt catalog --no-shell --no-hooks
terragrunt scaffold module-url --no-shellPriority order: CLI flags > catalog configuration > defaults (both default to false, allowing shell and hooks to be used by default)
Custom templates for scaffolding
Section titled âCustom templates for scaffoldingâTerragrunt has a basic template built-in for rendering terragrunt.hcl files, but you can provide your own templates to customize how code is generated! Scaffolding is done via boilerplate, and Terragrunt allows you to specify custom boilerplate templates via multiple mechanisms:
- You can define a custom Boilerplate template in a
.boilerplatesub-directory of any OpenTofu/Terraform module. - You can specify a custom Boilerplate template in the catalog configuration using the
default_templateoption. - You can specify a custom boilerplate template to use as the second argument of the
scaffoldcommand.
See the Catalog TUI and Scaffold pages for more details on configuring templates.