File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ function terraform_docs {
207
207
#
208
208
if $create_if_not_exist && [[ ! -f " $output_file " ]]; then
209
209
dir_have_tf_files=" $(
210
- find . -maxdepth 1 -type f | sed ' s|.*\.|| ' | sort -u | grep -oE ' ^tf$|^ tfvars$ ' ||
210
+ find . -maxdepth 1 \( -name ' *.tf ' -o -name ' *.tofu ' -o -name ' *. tfvars' \) -type f ||
211
211
exit 0
212
212
) "
213
213
Original file line number Diff line number Diff line change @@ -312,10 +312,10 @@ EOF
312
312
313
313
# Read content of all terraform files
314
314
# shellcheck disable=SC2207
315
- all_tf_content=$( find " ${full_module_dir} " -name ' *.tf' -maxdepth 1 -type f -exec cat {} +)
315
+ all_tf_content=$( find " ${full_module_dir} " -maxdepth 1 \( - name ' *.tf' -o -name ' *.tofu ' \) -type f -exec cat {} +)
316
316
317
317
if [[ ! $all_tf_content ]]; then
318
- common::colorify " yellow" " Skipping ${full_module_dir} because there are no * .tf files."
318
+ common::colorify " yellow" " Skipping ${full_module_dir} because there are no .tf or .tofu files."
319
319
continue
320
320
fi
321
321
You can’t perform that action at this time.
0 commit comments