formatter
Since v0.10.0
The following options are supported out of the box by terraform-docs and can be
used for FORMATTER_NAME:
asciidocreferenceasciidoc documentreferenceasciidoc tablereferencejsonreferencemarkdownreferencemarkdown documentreferencemarkdown tablereferenceprettyreferencetfvars hclreferencetfvars jsonreferencetomlreferencexmlreferenceyamlreference
Short version of formatters can also be used:
adocinstead ofasciidocmdinstead ofmarkdowndocinstead ofdocumenttblinstead oftable
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.
Options
Available options with their default values.
formatter: ""
formatter is required and cannot be empty in .terraform-docs.yml.
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"