mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 04:48:33 +07:00
21 lines
882 B
Cheetah
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 -}} |