mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 21:08:41 +07:00
2.1 KiB
2.1 KiB
title, description, menu, weight, toc
| title | description | menu | weight | toc | ||||
|---|---|---|---|---|---|---|---|---|
| formatter | formatter configuration |
|
123 | true |
Since v0.10.0
The following options are supported out of the box by terraform-docs and can be
used for FORMATTER_NAME:
asciidoc[reference]({{< ref "asciidoc" >}})asciidoc document[reference]({{< ref "asciidoc-document" >}})asciidoc table[reference]({{< ref "asciidoc-table" >}})json[reference]({{< ref "json" >}})markdown[reference]({{< ref "markdown" >}})markdown document[reference]({{< ref "markdown-document" >}})markdown table[reference]({{< ref "markdown-table" >}})pretty[reference]({{< ref "pretty" >}})tfvars hcl[reference]({{< ref "tfvars-hcl" >}})tfvars json[reference]({{< ref "tfvars-json" >}})toml[reference]({{< ref "toml" >}})xml[reference]({{< ref "xml" >}})yaml[reference]({{< ref "yaml" >}})
{{< alert type="info" >}} Short version of formatters can also be used:
adocinstead ofasciidocmdinstead ofmarkdowndocinstead ofdocumenttblinstead oftable{{< /alert >}}
{{< alert type="info" >}}
You need to pass name of a plugin as formatter in order to be able to
use the plugin. For example, if plugin binary file is called tfdocs-format-foo,
formatter name must be set to foo.
{{< /alert >}}
Options
Available options with their default values.
formatter: ""
{{< alert type="info" >}}
formatter is required and cannot be empty in .terraform-docs.yml.
{{< /alert >}}
Examples
Format as Markdown table:
formatter: "markdown table"
Format as Markdown document:
formatter: "md doc"
Format as AsciiDoc document:
formatter: "asciidoc document"
Format as tfdocs-format-myplugin:
formatter: "myplugin"