Files
terraform-docs/docs/user-guide/configuration/recursive.md
Khosrow Moossavi 54dc0f5a7c Add recursive config to .terraform-docs.yml file
Up to now there was only one way to enable recursive execution and that
was with `--recursive` CLI flag. This enables the same behavior but
within config file (i.e. `.terraform-docs.yml`)

Example:

```yaml
recursive:
  enabled: false
  path: modules
```

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-09-30 15:53:22 -04:00

970 B

title, description, menu, weight, toc
title description menu weight toc
recursive recursive configuration
docs
parent
configuration
127 true

Since v0.16.0

Documentation for main module and its submodules can be generated all in one execution using recursive config. It can be enabled with recursive.enabled: true.

Path to find submodules can be configured with recursive.path (defaults to modules).

{{< alert type="warning" >}} Generating documentation recursively is allowed only with output.file set. {{< /alert >}}

Each submodule can also have their own .terraform-docs.yml config file, to override configuration from root module.

Options

Available options with their default values.

recursive:
  enabled: false
  path: modules

Examples

Enable recursive mode for submodules folder.

recursive:
  enabled: true

Provide alternative name of submodules folder.

recursive:
  enabled: true
  path: submodules-folder