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

21 lines
882 B
Cheetah

{{- if or .Config.Sections.Resources .Config.Sections.DataSources -}}
{{- if not .Module.Resources -}}
{{- if not .Config.Settings.HideEmpty -}}
{{- indent 0 "=" }} Resources
No resources.
{{- end }}
{{ else }}
{{- indent 0 "=" }} Resources
The following resources are used by this module:
{{ range .Module.Resources }}
{{- $isResource := and $.Config.Sections.Resources ( eq "resource" (printf "%s" .GetMode)) }}
{{- $isDataResource := and $.Config.Sections.DataSources ( eq "data source" (printf "%s" .GetMode)) }}
{{- if or $isResource $isDataResource }}
{{- $fullspec := ternary .URL (printf "%s[%s]" .URL .Spec) .Spec }}
- {{ $fullspec }} {{ printf "(%s)" .GetMode -}}
{{- end }}
{{- end }}
{{ end }}
{{ end -}}