|
1 | 1 | # terraform-docs |
2 | 2 | A Github action for generating terraform module documentation using terraform-docs and gomplate. In addition to statically defined directory modules, this module can search specific sub folders or parse atlantis.yaml for module identification and doc generation. This action has the ability to auto commit docs to an open PR or after a push to a specific branch. |
3 | 3 | ## Version |
4 | | -v1.0.3 |
| 4 | +v1.0.4 |
5 | 5 |
|
6 | 6 | Supported and tested on terraform version 0.11+ & 0.12+ but may work for others. |
7 | 7 |
|
|
20 | 20 | ref: ${{ github.event.pull_request.head.ref }} |
21 | 21 |
|
22 | 22 | - name: Render terraform docs inside the USAGE.md and push changes back to PR branch |
23 | | - |
| 23 | + |
24 | 24 | with: |
25 | 25 | tf_docs_working_dir: . |
26 | 26 | tf_docs_output_file: USAGE.md |
|
30 | 30 | | WARNING: If USAGE.md already exists it will need to be updated, with the block delimeters `<!--- BEGIN_TF_DOCS --->` and `<!--- END_TF_DOCS --->`, where the generated markdown will be injected. | |
31 | 31 | | --- | |
32 | 32 |
|
| 33 | +### Renders |
33 | 34 |  |
34 | 35 |
|
35 | 36 | # Configuration |
@@ -115,26 +116,35 @@ jobs: |
115 | 116 | ## Simple / Single folder |
116 | 117 | ``` |
117 | 118 | - name: Generate TF Docs |
118 | | - |
| 119 | + |
119 | 120 | with: |
120 | 121 | tf_docs_working_dir: . |
121 | 122 | tf_docs_output_file: README.md |
122 | 123 | ``` |
123 | 124 |
|
| 125 | +## Multi folder |
| 126 | +``` |
| 127 | +- name: Generate TF Docs |
| 128 | + |
| 129 | + with: |
| 130 | + tf_docs_working_dir: .,example1,example3/modules/test |
| 131 | + tf_docs_output_file: README.md |
| 132 | +``` |
| 133 | +
|
124 | 134 | ## Use atlantis.yaml v3 to find all dirs |
125 | 135 | ``` |
126 | 136 | - name: Generate TF docs |
127 | | - |
| 137 | + |
128 | 138 | with: |
129 | 139 | tf_docs_atlantis_file: atlantis.yaml |
130 | 140 | ``` |
131 | 141 |
|
132 | 142 | ## Find all .tf file folders under a given directory |
133 | 143 | ```yaml |
134 | 144 | - name: Generate TF docs |
135 | | - |
| 145 | + |
136 | 146 | with: |
137 | 147 | tf_docs_find_dir: examples/ |
138 | 148 | ``` |
139 | 149 |
|
140 | | -Complete examples can be found [here](https://github.com/Dirrk/terraform-docs/tree/v1.0.3/examples) |
| 150 | +Complete examples can be found [here](https://github.com/Dirrk/terraform-docs/tree/v1.0.4/examples) |
0 commit comments