Files
terraform-docs/format/templates/asciidoc_table_inputs.tmpl
Khosrow Moossavi bb109711a1 Deprecate Settings and Options in favor of Config
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-09-28 15:47:27 -04:00

26 lines
1.2 KiB
Cheetah

{{- if .Config.Sections.Inputs -}}
{{- if not .Module.Inputs -}}
{{- if not .Config.Settings.HideEmpty -}}
{{- indent 0 "=" }} Inputs
No inputs.
{{- end }}
{{ else }}
{{- indent 0 "=" }} Inputs
[cols="a,a{{ if .Config.Settings.Type }},a{{ end }}{{ if .Config.Settings.Default }},a{{ end }}{{ if .Config.Settings.Required }},a{{ end }}",options="header,autowidth"]
|===
|Name |Description
{{- if .Config.Settings.Type }} |Type{{ end }}
{{- if .Config.Settings.Default }} |Default{{ end }}
{{- if .Config.Settings.Required }} |Required{{ end }}
{{- range .Module.Inputs }}
|{{ anchorNameAsciidoc "input" .Name }}
|{{ tostring .Description | sanitizeAsciidocTbl }}
{{- if $.Config.Settings.Type }}{{ printf "\n" }}|{{ tostring .Type | type | sanitizeAsciidocTbl }}{{ end }}
{{- if $.Config.Settings.Default }}{{ printf "\n" }}|{{ value .GetValue | sanitizeAsciidocTbl }}{{ end }}
{{- if $.Config.Settings.Required }}{{ printf "\n" }}|{{ ternary .Required "yes" "no" }}{{ end }}
{{ end }}
|===
{{ end }}
{{ end -}}