Files
terraform-modules/scripts/generate-docs.sh
Tamas Kiss b1062b37ec
Some checks failed
continuous-integration/drone/push Build is failing
ci: added ci pipelines
2022-05-26 23:24:56 +02:00

19 lines
385 B
Bash
Executable File

#!/bin/bash
for DIR in $(find . -type d); do
if [[ "${DIR}" = "." ]] || [[ $(echo ${DIR} | cut -c1-5) = ".git/" ]]; then
continue;
fi
pushd $DIR
terraform_files=$(find . -maxdepth 1 -type f -iname '*.tf')
if [[ ${#terraform_files} -eq 0 ]]; then
popd
continue
fi
terraform-docs markdown document . > README.md
popd
done