formatter
Since v0.10.0
The following options are supported out of the box by terraform-docs and can be
used for FORMATTER_NAME
:
asciidoc
referenceasciidoc document
referenceasciidoc table
referencejson
referencemarkdown
referencemarkdown document
referencemarkdown table
referencepretty
referencetfvars hcl
referencetfvars json
referencetoml
referencexml
referenceyaml
reference
Short version of formatters can also be used:
adoc
instead ofasciidoc
md
instead ofmarkdown
doc
instead ofdocument
tbl
instead 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"