-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.terraform-docs.yml
More file actions
137 lines (108 loc) · 2.61 KB
/
.terraform-docs.yml
File metadata and controls
137 lines (108 loc) · 2.61 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# ============================================================================
# TERRAFORM-DOCS CONFIGURATION
# ============================================================================
# Configuration for generating documentation for Terraform modules
# Supports recursive documentation generation for all modules
# ============================================================================
# Document formatter (markdown, asciidoc, json, table, xml, yaml)
formatter: "markdown"
# Version constraint for terraform-docs
version: ">= 0.16"
# Header and footer content sources
header-from: "README.md"
footer-from: ""
# Recursive documentation generation
recursive:
enabled: true
path: modules
include-main: true
# Content sections to include/exclude
sections:
hide:
- header
- footer
show:
- requirements
- providers
- modules
- resources
- inputs
- outputs
# Custom content template
content: |-
## Usage
Basic usage of this module:
```hcl
{{ if .Module.Source -}}
module "{{ .Module.Name }}" {
source = "{{ .Module.Source }}"
{{ range .Module.Inputs -}}
{{ if .Required -}}
{{ .Name }} = {{ .Type | type }}
{{ end -}}
{{ end -}}
}
{{ else -}}
# See examples/ directory for usage examples
{{ end -}}
```
{{ .Requirements }}
{{ .Providers }}
{{ .Modules }}
{{ .Resources }}
{{ .Inputs }}
{{ .Outputs }}
# Output configuration
output:
file: "README.md"
mode: inject
template: |-
<!-- BEGIN_TF_DOCS -->
{{ .Content }}
<!-- END_TF_DOCS -->
# Output values configuration
output-values:
enabled: true
from: "outputs.tf"
# Sorting configuration
sort:
enabled: true
by: name
# General settings
settings:
# Enable anchor links in markdown
anchor: true
# Enable colored output
color: true
# Show default values
default: true
# Show descriptions
description: true
# Escape special characters
escape: true
# Hide empty sections
hide-empty: true
# Enable HTML in markdown
html: true
# Indentation level
indent: 2
# Include lockfile information
lockfile: true
# Read comments from Terraform files
read-comments: true
# Show required/optional indicators
required: true
# Show sensitive value indicators
sensitive: true
# Show variable types
type: true
# Word wrap for long lines
wrap: 120
# Validation rules (simplified)
validation:
# Require descriptions for all variables
required-inputs-description: false
# Require descriptions for all outputs
required-outputs-description: false
# Validate variable types
validate-types: false