Add ShowDescription to Settings

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
This commit is contained in:
Khosrow Moossavi
2021-04-16 11:29:45 -04:00
parent 45178f4b94
commit e2e7a61ad7
4 changed files with 6 additions and 6 deletions

View File

@@ -126,6 +126,7 @@ file formats are `.adoc`, `.md`, `.tf`, and `.txt`. Default value is `""`.
The following options are supported and can be used for `sections.show` and
`sections.hide`:
- `data-sources`
- `header`
- `inputs`
- `modules`

2
go.mod
View File

@@ -11,7 +11,7 @@ require (
github.com/spf13/cobra v1.1.3
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.0
github.com/terraform-docs/plugin-sdk v0.2.1-0.20210329203526-90c9fa0bfae9
github.com/terraform-docs/plugin-sdk v0.2.1-0.20210414225119-514f684220b7
github.com/terraform-docs/terraform-config-inspect v0.0.0-20210126151735-6ef25af8884f
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
honnef.co/go/tools v0.1.2

6
go.sum
View File

@@ -221,10 +221,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/terraform-docs/plugin-sdk v0.2.0 h1:dOoPRe0TSg42ywdv/DFG6UrCZ2XPwnS/z8uZjEgz7ro=
github.com/terraform-docs/plugin-sdk v0.2.0/go.mod h1:3G+0nZTeaMF1c5CZh8cOEYeNq0kUL6+DlQOVcxK7eCQ=
github.com/terraform-docs/plugin-sdk v0.2.1-0.20210329203526-90c9fa0bfae9 h1:S9JjFwxoxMJo99hv5mvBNndN/Hu8DEi8qYPJHzSIk4o=
github.com/terraform-docs/plugin-sdk v0.2.1-0.20210329203526-90c9fa0bfae9/go.mod h1:3G+0nZTeaMF1c5CZh8cOEYeNq0kUL6+DlQOVcxK7eCQ=
github.com/terraform-docs/plugin-sdk v0.2.1-0.20210414225119-514f684220b7 h1:lk07nhTl6Mz3cVP12DNN9j3/QOd4FySlv1oU6UbND+A=
github.com/terraform-docs/plugin-sdk v0.2.1-0.20210414225119-514f684220b7/go.mod h1:3G+0nZTeaMF1c5CZh8cOEYeNq0kUL6+DlQOVcxK7eCQ=
github.com/terraform-docs/terraform-config-inspect v0.0.0-20210126151735-6ef25af8884f h1:WXgHENMC8JOyj6aRpOlnAnJkZ3ZAkPBOhqYrJ5GOhDE=
github.com/terraform-docs/terraform-config-inspect v0.0.0-20210126151735-6ef25af8884f/go.mod h1:GtanFwTsRRXScYHOMb5h4K18XQBFeS2tXat9/LrPtPc=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=

View File

@@ -59,7 +59,7 @@ type Settings struct {
// scope: Asciidoc, Markdown
ShowDefault bool
// ShowDescription show "Descriptions on variables" column
// ShowDescription show "Descriptions" as comment on variables
//
// default: false
// scope: tfvars hcl
@@ -166,6 +166,7 @@ func (s *Settings) Convert() *printsdk.Settings {
ShowColor: s.ShowColor,
ShowDataSources: s.ShowDataSources,
ShowDefault: s.ShowDefault,
ShowDescription: s.ShowDescription,
ShowFooter: s.ShowFooter,
ShowHeader: s.ShowHeader,
ShowInputs: s.ShowInputs,