Add new '--show all' and '--hide all' sections

New psuedo section `all` is added and can be used to show or hide _all_
sections. This can be used as a replacement for, now, deprecated and
removed `--show-all` and `--hide-all` flags.

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
This commit is contained in:
Khosrow Moossavi
2021-06-02 12:54:03 -04:00
parent 25f03b4cf4
commit d77324cc02
18 changed files with 83 additions and 80 deletions

View File

@@ -30,16 +30,16 @@ terraform-docs asciidoc document [PATH] [flags]
--default show Default column or section (default true)
--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]
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--indent int indention level of AsciiDoc sections [1, 2, 3, 4, 5] (default 2)
--output-file string File path 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-file string file path 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 "")
--required show Required column or section (default true)
--sensitive show Sensitive column or section (default true)
--show strings show section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--show strings show section [all, 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")
--type show Type column or section (default true)

View File

@@ -30,16 +30,16 @@ terraform-docs asciidoc table [PATH] [flags]
--default show Default column or section (default true)
--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]
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--indent int indention level of AsciiDoc sections [1, 2, 3, 4, 5] (default 2)
--output-file string File path 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-file string file path 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 "")
--required show Required column or section (default true)
--sensitive show Sensitive column or section (default true)
--show strings show section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--show strings show section [all, 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")
--type show Type column or section (default true)

View File

@@ -34,13 +34,13 @@ terraform-docs asciidoc [PATH] [flags]
-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 path 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 -->")
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--output-file string file path 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]
--show strings show section [all, 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")
```

View File

@@ -29,13 +29,13 @@ terraform-docs json [PATH] [flags]
-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 path 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 -->")
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--output-file string file path 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]
--show strings show section [all, 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")
```

View File

@@ -31,17 +31,17 @@ terraform-docs markdown document [PATH] [flags]
--escape escape special characters (default true)
--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]
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--html use HTML tags in genereted output (default true)
--indent int indention level of Markdown sections [1, 2, 3, 4, 5] (default 2)
--output-file string File path 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-file string file path 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 "")
--required show Required column or section (default true)
--sensitive show Sensitive column or section (default true)
--show strings show section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--show strings show section [all, 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")
--type show Type column or section (default true)

View File

@@ -31,17 +31,17 @@ terraform-docs markdown table [PATH] [flags]
--escape escape special characters (default true)
--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]
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--html use HTML tags in genereted output (default true)
--indent int indention level of Markdown sections [1, 2, 3, 4, 5] (default 2)
--output-file string File path 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-file string file path 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 "")
--required show Required column or section (default true)
--sensitive show Sensitive column or section (default true)
--show strings show section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--show strings show section [all, 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")
--type show Type column or section (default true)

View File

@@ -36,13 +36,13 @@ terraform-docs markdown [PATH] [flags]
-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 path 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 -->")
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--output-file string file path 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]
--show strings show section [all, 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")
```

View File

@@ -29,13 +29,13 @@ terraform-docs pretty [PATH] [flags]
-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 path 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 -->")
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--output-file string file path 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]
--show strings show section [all, 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")
```

View File

@@ -23,13 +23,13 @@ terraform-docs [PATH] [flags]
--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")
-h, --help help for terraform-docs
--hide strings hide section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--output-file string File path 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 -->")
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--output-file string file path 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]
--show strings show section [all, 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")
```

View File

@@ -29,13 +29,13 @@ terraform-docs tfvars hcl [PATH] [flags]
-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 path 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 -->")
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--output-file string file path 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]
--show strings show section [all, 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")
```

View File

@@ -28,13 +28,13 @@ terraform-docs tfvars json [PATH] [flags]
-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 path 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 -->")
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--output-file string file path 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]
--show strings show section [all, 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")
```

View File

@@ -24,13 +24,13 @@ Generate terraform.tfvars of inputs.
-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 path 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 -->")
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--output-file string file path 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]
--show strings show section [all, 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")
```

View File

@@ -28,13 +28,13 @@ terraform-docs toml [PATH] [flags]
-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 path 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 -->")
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--output-file string file path 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]
--show strings show section [all, 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")
```

View File

@@ -28,13 +28,13 @@ terraform-docs xml [PATH] [flags]
-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 path 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 -->")
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--output-file string file path 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]
--show strings show section [all, 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")
```

View File

@@ -28,13 +28,13 @@ terraform-docs yaml [PATH] [flags]
-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 path 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 -->")
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--output-file string file path 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]
--show strings show section [all, 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")
```