-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.terraform-docs.yml
56 lines (50 loc) · 1.06 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
formatter: markdown table
content: |-
{{ .Requirements }}
{{ .Modules }}
{{ .Providers }}
{{ .Resources }}
{{ .Inputs }}
{{ .Outputs }}
{{/* EXAMPLES */}}{{
with $version := include ".version"
}}{{
$template := include "./examples/examples.md"
}}{{
range $match := regexFindAll "{{ include \".*\" }}" $template -1
}}{{
$fileName := index (regexSplit "\"" $match -1) 1
}}{{
$template = replace $match (include (print "./examples/" $fileName)) $template
}}{{
$template = replace "{{ provider_version }}" $version $template
}}{{
end
}}{{
$template
}}{{
end
}}
output:
file: "README.md"
mode: inject
template: |-
<!-- START_OF_AUTO_GENERATED_SECTION -->
{{ .Content }}
<!-- END_OF_AUTO_GENERATED_SECTION -->
sort:
enabled: false
settings:
anchor: true
color: true
default: true
description: true
escape: true
hide-empty: true
html: true
indent: 2
lockfile: true
read-comments: true
required: true
sensitive: true
type: true