Skip to content

Commit c8fc7ab

Browse files
committed
add ability to show or hide data-sources
Signed-off-by: Edgar R. Sandi <edgar.r.sandi@gmail.com>
1 parent 930bfba commit c8fc7ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+324
-243
lines changed

docs/reference/asciidoc-document.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ terraform-docs asciidoc document [PATH] [flags]
3030
--default show Default column or section (default true)
3131
--footer-from string relative path of a file to read footer from (default "")
3232
--header-from string relative path of a file to read header from (default "main.tf")
33-
--hide strings hide section [footer, header, inputs, modules, outputs, providers, requirements, resources]
33+
--hide strings hide section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
3434
--hide-all hide all sections (default false)
3535
--indent int indention level of AsciiDoc sections [1, 2, 3, 4, 5] (default 2)
3636
--output-file string File in module directory to insert output into (default "")
@@ -40,7 +40,7 @@ terraform-docs asciidoc document [PATH] [flags]
4040
--output-values-from string inject output values from file into outputs (default "")
4141
--required show Required column or section (default true)
4242
--sensitive show Sensitive column or section (default true)
43-
--show strings show section [footer, header, inputs, modules, outputs, providers, requirements, resources]
43+
--show strings show section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
4444
--show-all show all sections (default true)
4545
--sort sort items (default true)
4646
--sort-by string sort items by criteria [name, required, type] (default "name")

docs/reference/asciidoc-table.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ terraform-docs asciidoc table [PATH] [flags]
3030
--default show Default column or section (default true)
3131
--footer-from string relative path of a file to read footer from (default "")
3232
--header-from string relative path of a file to read header from (default "main.tf")
33-
--hide strings hide section [footer, header, inputs, modules, outputs, providers, requirements, resources]
33+
--hide strings hide section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
3434
--hide-all hide all sections (default false)
3535
--indent int indention level of AsciiDoc sections [1, 2, 3, 4, 5] (default 2)
3636
--output-file string File in module directory to insert output into (default "")
@@ -40,7 +40,7 @@ terraform-docs asciidoc table [PATH] [flags]
4040
--output-values-from string inject output values from file into outputs (default "")
4141
--required show Required column or section (default true)
4242
--sensitive show Sensitive column or section (default true)
43-
--show strings show section [footer, header, inputs, modules, outputs, providers, requirements, resources]
43+
--show strings show section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
4444
--show-all show all sections (default true)
4545
--sort sort items (default true)
4646
--sort-by string sort items by criteria [name, required, type] (default "name")

docs/reference/asciidoc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ terraform-docs asciidoc [PATH] [flags]
3434
-c, --config string config file name (default ".terraform-docs.yml")
3535
--footer-from string relative path of a file to read footer from (default "")
3636
--header-from string relative path of a file to read header from (default "main.tf")
37-
--hide strings hide section [footer, header, inputs, modules, outputs, providers, requirements, resources]
37+
--hide strings hide section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
3838
--hide-all hide all sections (default false)
3939
--output-file string File in module directory to insert output into (default "")
4040
--output-mode string Output to file method [inject, replace] (default "inject")
4141
--output-template string Output template (default "<!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS -->")
4242
--output-values inject output values into outputs (default false)
4343
--output-values-from string inject output values from file into outputs (default "")
44-
--show strings show section [footer, header, inputs, modules, outputs, providers, requirements, resources]
44+
--show strings show section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
4545
--show-all show all sections (default true)
4646
--sort sort items (default true)
4747
--sort-by string sort items by criteria [name, required, type] (default "name")

docs/reference/json.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ terraform-docs json [PATH] [flags]
2929
-c, --config string config file name (default ".terraform-docs.yml")
3030
--footer-from string relative path of a file to read footer from (default "")
3131
--header-from string relative path of a file to read header from (default "main.tf")
32-
--hide strings hide section [footer, header, inputs, modules, outputs, providers, requirements, resources]
32+
--hide strings hide section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
3333
--hide-all hide all sections (default false)
3434
--output-file string File in module directory to insert output into (default "")
3535
--output-mode string Output to file method [inject, replace] (default "inject")
3636
--output-template string Output template (default "<!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS -->")
3737
--output-values inject output values into outputs (default false)
3838
--output-values-from string inject output values from file into outputs (default "")
39-
--show strings show section [footer, header, inputs, modules, outputs, providers, requirements, resources]
39+
--show strings show section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
4040
--show-all show all sections (default true)
4141
--sort sort items (default true)
4242
--sort-by string sort items by criteria [name, required, type] (default "name")

docs/reference/markdown-document.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ terraform-docs markdown document [PATH] [flags]
3131
--escape escape special characters (default true)
3232
--footer-from string relative path of a file to read footer from (default "")
3333
--header-from string relative path of a file to read header from (default "main.tf")
34-
--hide strings hide section [footer, header, inputs, modules, outputs, providers, requirements, resources]
34+
--hide strings hide section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
3535
--hide-all hide all sections (default false)
3636
--indent int indention level of Markdown sections [1, 2, 3, 4, 5] (default 2)
3737
--output-file string File in module directory to insert output into (default "")
@@ -41,7 +41,7 @@ terraform-docs markdown document [PATH] [flags]
4141
--output-values-from string inject output values from file into outputs (default "")
4242
--required show Required column or section (default true)
4343
--sensitive show Sensitive column or section (default true)
44-
--show strings show section [footer, header, inputs, modules, outputs, providers, requirements, resources]
44+
--show strings show section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
4545
--show-all show all sections (default true)
4646
--sort sort items (default true)
4747
--sort-by string sort items by criteria [name, required, type] (default "name")

docs/reference/markdown-table.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ terraform-docs markdown table [PATH] [flags]
3131
--escape escape special characters (default true)
3232
--footer-from string relative path of a file to read footer from (default "")
3333
--header-from string relative path of a file to read header from (default "main.tf")
34-
--hide strings hide section [footer, header, inputs, modules, outputs, providers, requirements, resources]
34+
--hide strings hide section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
3535
--hide-all hide all sections (default false)
3636
--indent int indention level of Markdown sections [1, 2, 3, 4, 5] (default 2)
3737
--output-file string File in module directory to insert output into (default "")
@@ -41,7 +41,7 @@ terraform-docs markdown table [PATH] [flags]
4141
--output-values-from string inject output values from file into outputs (default "")
4242
--required show Required column or section (default true)
4343
--sensitive show Sensitive column or section (default true)
44-
--show strings show section [footer, header, inputs, modules, outputs, providers, requirements, resources]
44+
--show strings show section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
4545
--show-all show all sections (default true)
4646
--sort sort items (default true)
4747
--sort-by string sort items by criteria [name, required, type] (default "name")

docs/reference/markdown.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ terraform-docs markdown [PATH] [flags]
3535
-c, --config string config file name (default ".terraform-docs.yml")
3636
--footer-from string relative path of a file to read footer from (default "")
3737
--header-from string relative path of a file to read header from (default "main.tf")
38-
--hide strings hide section [footer, header, inputs, modules, outputs, providers, requirements, resources]
38+
--hide strings hide section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
3939
--hide-all hide all sections (default false)
4040
--output-file string File in module directory to insert output into (default "")
4141
--output-mode string Output to file method [inject, replace] (default "inject")
4242
--output-template string Output template (default "<!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS -->")
4343
--output-values inject output values into outputs (default false)
4444
--output-values-from string inject output values from file into outputs (default "")
45-
--show strings show section [footer, header, inputs, modules, outputs, providers, requirements, resources]
45+
--show strings show section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
4646
--show-all show all sections (default true)
4747
--sort sort items (default true)
4848
--sort-by string sort items by criteria [name, required, type] (default "name")

docs/reference/pretty.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ terraform-docs pretty [PATH] [flags]
2929
-c, --config string config file name (default ".terraform-docs.yml")
3030
--footer-from string relative path of a file to read footer from (default "")
3131
--header-from string relative path of a file to read header from (default "main.tf")
32-
--hide strings hide section [footer, header, inputs, modules, outputs, providers, requirements, resources]
32+
--hide strings hide section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
3333
--hide-all hide all sections (default false)
3434
--output-file string File in module directory to insert output into (default "")
3535
--output-mode string Output to file method [inject, replace] (default "inject")
3636
--output-template string Output template (default "<!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS -->")
3737
--output-values inject output values into outputs (default false)
3838
--output-values-from string inject output values from file into outputs (default "")
39-
--show strings show section [footer, header, inputs, modules, outputs, providers, requirements, resources]
39+
--show strings show section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
4040
--show-all show all sections (default true)
4141
--sort sort items (default true)
4242
--sort-by string sort items by criteria [name, required, type] (default "name")
@@ -109,8 +109,8 @@ generates the following output:
109109

110110
resource.null_resource.foo (resource) (https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource)
111111
resource.tls_private_key.baz (resource) (https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key)
112-
resource.aws_caller_identity.current (data source) (https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity)
113-
resource.aws_caller_identity.ident (data source) (https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity)
112+
data.aws_caller_identity.current (data source) (https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity)
113+
data.aws_caller_identity.ident (data source) (https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity)
114114

115115

116116
input.bool-1 (true)

docs/reference/terraform-docs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ terraform-docs [PATH] [flags]
2323
--footer-from string relative path of a file to read footer from (default "")
2424
--header-from string relative path of a file to read header from (default "main.tf")
2525
-h, --help help for terraform-docs
26-
--hide strings hide section [footer, header, inputs, modules, outputs, providers, requirements, resources]
26+
--hide strings hide section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
2727
--hide-all hide all sections (default false)
2828
--output-file string File in module directory to insert output into (default "")
2929
--output-mode string Output to file method [inject, replace] (default "inject")
3030
--output-template string Output template (default "<!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS -->")
3131
--output-values inject output values into outputs (default false)
3232
--output-values-from string inject output values from file into outputs (default "")
33-
--show strings show section [footer, header, inputs, modules, outputs, providers, requirements, resources]
33+
--show strings show section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
3434
--show-all show all sections (default true)
3535
--sort sort items (default true)
3636
--sort-by string sort items by criteria [name, required, type] (default "name")

docs/reference/tfvars-hcl.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ terraform-docs tfvars hcl [PATH] [flags]
2929
-c, --config string config file name (default ".terraform-docs.yml")
3030
--footer-from string relative path of a file to read footer from (default "")
3131
--header-from string relative path of a file to read header from (default "main.tf")
32-
--hide strings hide section [footer, header, inputs, modules, outputs, providers, requirements, resources]
32+
--hide strings hide section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
3333
--hide-all hide all sections (default false)
3434
--output-file string File in module directory to insert output into (default "")
3535
--output-mode string Output to file method [inject, replace] (default "inject")
3636
--output-template string Output template (default "<!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS -->")
3737
--output-values inject output values into outputs (default false)
3838
--output-values-from string inject output values from file into outputs (default "")
39-
--show strings show section [footer, header, inputs, modules, outputs, providers, requirements, resources]
39+
--show strings show section [data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
4040
--show-all show all sections (default true)
4141
--sort sort items (default true)
4242
--sort-by string sort items by criteria [name, required, type] (default "name")

0 commit comments

Comments
 (0)