-
Notifications
You must be signed in to change notification settings - Fork 4
/
sections.tmpl
63 lines (56 loc) · 1.34 KB
/
sections.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{{- if .Config.Sections.Header -}}
{{- with .Module.Header -}}
{{ . }}
{{ printf "\n" }}
{{- end -}}
{{ end -}}
{{- if .Config.Sections.Inputs -}}
{{ indent 0 "#" }} Inputs
{{ if not .Module.Inputs }}
No inputs.
{{ else }}
{{- range .Module.Inputs }}
{{ printf "\n" }}
{{ indent 1 "#" }} {{ name .Name }} ` + "`" + `{{ .Type }}` + "`" + `
Description: {{ .Description }}
Default: {{ .GetValue }}
{{- end }}
{{ end }}
{{ end -}}
{{- if .Config.Sections.Outputs -}}
{{ indent 0 "#" }} Outputs
{{ if not .Module.Outputs }}
No outputs.
{{ else }}
| Name | Description | Type | Default |
|------|-------------|------|---------|
{{- range .Module.Outputs }}
- {{ .Name }}
- {{ .Description }}
{{- end }}
{{ end }}
{{ end -}}
{{- if .Config.Sections.Requirements -}}
{{ indent 0 "#" }} Requirements
Intentionally don't show requirements to demonstrate the flexibility of the plugin.
{{ end -}}
{{- if .Config.Sections.Providers -}}
{{ indent 0 "#" }} Providers
{{ if not .Module.Providers }}
No providers.
{{ else }}
{{- range .Module.Providers }}
- {{ .Name }}
{{- end }}
{{- end }}
{{ end -}}
{{- if .Config.Sections.Resources -}}
{{ indent 0 "#" }} Resources
{{ if not .Module.Resources }}
No resources.
{{ else }}
{{- range .Module.Resources }}
- {{ .ProviderName }}
{{- end }}
{{- end }}
{{ end -}}