feat: Add argument like `force-init` to do init before terraform validate
antonbabenko opened this issue · comments
Add an argument to terraform_validate
to run terraform init
before running terraform validate
.
Originally posted by @eytanhanig in #203 (comment)
Notes fo contributors:
Additionally to force-init
option, we can use terraform providers
and run terraform init
if necessary, automatically. See this comment for more details - #299 (comment)
Not needed anymore. The current realization is superior to that
If there are no deps for t validate
- it will fail in a fraction of a second, so no need to "force-init"
pre-commit-terraform/hooks/terraform_validate.sh
Lines 114 to 133 in 8bcd633