Files
terraform-docs/format/templates/markdown_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

32 lines
1.3 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
| Name | Description |
{{- if .Config.Settings.Type }} Type |{{ end }}
{{- if .Config.Settings.Default }} Default |{{ end }}
{{- if .Config.Settings.Required }} Required |{{ end }}
|------|-------------|
{{- if .Config.Settings.Type }}------|{{ end }}
{{- if .Config.Settings.Default }}---------|{{ end }}
{{- if .Config.Settings.Required }}:--------:|{{ end }}
{{- range .Module.Inputs }}
| {{ anchorNameMarkdown "input" .Name }} | {{ tostring .Description | sanitizeMarkdownTbl }} |
{{- if $.Config.Settings.Type -}}
{{ printf " " }}{{ tostring .Type | type | sanitizeMarkdownTbl }} |
{{- end -}}
{{- if $.Config.Settings.Default -}}
{{ printf " " }}{{ value .GetValue | sanitizeMarkdownTbl }} |
{{- end -}}
{{- if $.Config.Settings.Required -}}
{{ printf " " }}{{ ternary .Required "yes" "no" }} |
{{- end -}}
{{- end }}
{{ end }}
{{ end -}}