Skip to content

Commit

Permalink
fix updating terraform docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 authored and mergify[bot] committed Oct 21, 2024
1 parent 08f6166 commit bf8e74f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion terraform/update-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
files=()
find "${SCRIPT_DIR}"/* -type d | while read -r i; do
module_name=$(basename "$i")
markdown_file="${SCRIPT_DIR}/${module_name}.md"
terraform-docs --config "${SCRIPT_DIR}/.terraform-docs.yml" markdown table --output-file "${markdown_file}" --output-mode inject "${module_name}"
files+=("${markdown_file}")
done
nix fmt -- "${files[@]}"
cd ..
nix fmt -- --no-cache

0 comments on commit bf8e74f

Please sign in to comment.