mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 12:58:35 +07:00
21 lines
864 B
Cheetah
21 lines
864 B
Cheetah
{{- if or .Settings.ShowResources .Settings.ShowDataSources -}}
|
|
{{- if not .Module.Resources -}}
|
|
{{- if not .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 $.Settings.ShowResources ( eq "resource" (printf "%s" .GetMode)) }}
|
|
{{- $isDataResource := and $.Settings.ShowDataSources ( eq "data source" (printf "%s" .GetMode)) }}
|
|
{{- if or $isResource $isDataResource }}
|
|
{{- $fullspec := ternary .URL (printf "[%s](%s)" .Spec .URL) .Spec }}
|
|
- {{ $fullspec }} {{ printf "(%s)" .GetMode -}}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{ end }}
|
|
{{ end -}} |