From 2d776ef95418d08e3a067f7985f438608c56cd25 Mon Sep 17 00:00:00 2001 From: jez Date: Mon, 21 Mar 2022 23:56:53 -0400 Subject: [PATCH] Add: documentation tools --- .terraform-docs.yml | 48 +++++++++++++++++++++++++++++++++++++++++++++ build_docs.sh | 11 +++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .terraform-docs.yml create mode 100755 build_docs.sh diff --git a/.terraform-docs.yml b/.terraform-docs.yml new file mode 100644 index 0000000..d4dbfc5 --- /dev/null +++ b/.terraform-docs.yml @@ -0,0 +1,48 @@ +formatter: "" # this is required + +version: "" + +header-from: main.tf +footer-from: "" + +recursive: + enabled: true + path: . + +sections: + hide: [] + show: [] + +content: "" + +output: + file: "" + mode: inject + template: |- + + {{ .Content }} + + +output-values: + enabled: false + from: "" + +sort: + enabled: true + by: name + +settings: + anchor: true + color: true + default: true + description: true + escape: true + hide-empty: false + html: true + indent: 2 + lockfile: true + read-comments: true + required: true + sensitive: true + type: true + diff --git a/build_docs.sh b/build_docs.sh new file mode 100755 index 0000000..a23df22 --- /dev/null +++ b/build_docs.sh @@ -0,0 +1,11 @@ +#!/bin/bash + + +for i in $(ls -1 | grep -E "virt_|cloud_"); do + + echo terraform-docs markdown "$i > $i/README.md" + terraform-docs markdown "$i" > "$i/README.md" + +done + +