Files
terraform-docs/format/templates/asciidoc_table_inputs.tmpl
Khosrow Moossavi 90942f73b8 Move format package from internal to public
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-09-28 14:43:26 -04:00

26 lines
1.1 KiB
Cheetah

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