mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 12:58:35 +07:00
As of `v0.13.0` flags `--show-all` and `--hide-all` are deprecated in
favor of explicit use of `--show` and `--hide`. In other words when
`--show <section>` is used, only `<section>` will be shown. If you want
to show multiple sections and hide the rest you can specify multiple
`--show` flags. The same logic is also applied to `--hide`.
# show 'inputs' and hide everything else
$ terraform-docs --show inputs <formatter>
# show 'inputs' and show 'outputs' and hide everything else
$ terraform-docs --show inputs --show outputs <formatter>
# hide 'header' and show everything else
$ terraform-docs --hide header <formatter>
# hide 'header' and hide 'providers' and show everything else
$ terraform-docs --hide header --hide providers <formatter>
Note: Using `--show` or `--hide` CLI flag will completely override the
values from `.terraform-docs.yml`. Example:
$ cat .terraform-docs.yml
sections:
show:
- inputs
- outputs
# example 1: this will only show 'providers'
$ terraform-docs --show providers .
# example 2: this will hide 'inputs' and hide 'providers' and show everything else
$ terraform-docs --hide inputs --hide providers .
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2.1 KiB
2.1 KiB
title, description, menu, weight, toc
| title | description | menu | weight | toc | ||||
|---|---|---|---|---|---|---|---|---|
| asciidoc | Generate AsciiDoc of inputs and outputs. |
|
951 | true |
Synopsis
Generate AsciiDoc of inputs and outputs.
terraform-docs asciidoc [PATH] [flags]
Options
--anchor create anchor links (default true)
--default show Default column or section (default true)
-h, --help help for asciidoc
--indent int indention level of AsciiDoc sections [1, 2, 3, 4, 5] (default 2)
--required show Required column or section (default true)
--sensitive show Sensitive column or section (default true)
--type show Type column or section (default true)
Inherited Options
-c, --config string config file name (default ".terraform-docs.yml")
--footer-from string relative path of a file to read footer from (default "")
--header-from string relative path of a file to read header from (default "main.tf")
--hide strings hide section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--output-file string File in module directory to insert output into (default "")
--output-mode string Output to file method [inject, replace] (default "inject")
--output-template string Output template (default "<!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS -->")
--output-values inject output values into outputs (default false)
--output-values-from string inject output values from file into outputs (default "")
--show strings show section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--sort sort items (default true)
--sort-by string sort items by criteria [name, required, type] (default "name")
Subcommands
- [terraform-docs asciidoc document]({{< ref "asciidoc-document" >}})
- [terraform-docs asciidoc table]({{< ref "asciidoc-table" >}})