-
Notifications
You must be signed in to change notification settings - Fork 1
/
.terraform-docs.yml
80 lines (68 loc) · 2.07 KB
/
.terraform-docs.yml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
formatter: "markdown table" # this is required
sections:
hide: []
show:
- inputs
- modules
- outputs
- requirements
- resources
content: |-
## Requirements
| Name | Provider | Version |
|------|----------|---------|
{{- $reqs := .Module.Requirements -}}
{{- $ress := .Module.Resources -}}
{{- range $reqs -}}
{{- $req := . -}}
{{- range $ress -}}
{{- $res := . -}}
{{- if eq $req.Name $res.ProviderName }}
| `{{ $req.Name }}` | [{{ $res.ProviderSource }}](https://registry.terraform.io/providers/{{ $res.ProviderSource }}/latest/docs) | `{{ $req.Version }}` |
{{- break -}}
{{- else }}
| `{{ $req.Name }}` | | `{{ $req.Version }}` |
{{- break -}}
{{- end }}
{{- end -}}
{{- end }}
## Inputs
| Req | Variable | Type | Description | Default |
|:---:|----------|------|-------------|---------|
{{- range .Module.Inputs }}
| {{ if eq .Required true }}:white_check_mark:{{ else }}{{ end }} | `{{ .Name }}` | [`{{ .Type }}`](https://opentofu.org/docs/language/expressions/types/) | {{ .Description }} | {{ if .HasDefault }}`{{ .GetValue }}`{{ end }} |
{{- end }}
## Outputs
| Name | Description |
|------|-------------|
{{- range .Module.Outputs }}
| `{{ .Name }}` | {{ if eq .Sensitive true }}<span title="This is a sensitive value.">:eye_speech_bubble:</span> {{ end }}{{ .Description }} |
{{- end }}
## Resources
| Kind | Source | Name | Provider |
|------|--------|------|----------|
{{- range .Module.Resources }}
| {{ .GetMode }} | [`{{ if eq .Mode "data" }}{{ .Mode }}.{{ end }}{{ .ProviderName }}_{{ .Type }}`]({{ .URL }}) | `{{ .Name }}` | [{{ .ProviderSource }}](https://registry.terraform.io/providers/{{ .ProviderSource }}/latest/docs) |
{{- end }}
output:
file: "README.md"
mode: inject
template: |-
<!-- BEGIN_TF_DOCS -->
{{ .Content }}
<!-- END_TF_DOCS -->
sort:
enabled: true
by: required
settings:
anchor: false
default: true
escape: false
hide-empty: false
html: false
indent: 2
lockfile: false
read-comments: false
required: true
sensitive: true
type: true