We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
terraform_validate
.terraform/
1 parent 148eb8f commit d0d08acCopy full SHA for d0d08ac
hooks/terraform_validate.sh
@@ -109,6 +109,16 @@ function per_dir_hook_unique_part {
109
esac
110
done
111
112
+ # First try `terraform validate` with the hope that all deps are
113
+ # pre-installed. That is needed for cases when `.terraform/modules`
114
+ # or `.terraform/providers` missed AND that is expected.
115
+ terraform validate "${args[@]}" 2>&1 && {
116
+ exit_code=$?
117
+ return $exit_code
118
+ }
119
+
120
+ # In case `terraform validate` failed to execute
121
+ # - check is simple `terraform init` will help
122
common::terraform_init 'terraform validate' "$dir_path" || {
123
exit_code=$?
124
return $exit_code
0 commit comments