Commit 02c1935
fix(
### Description of your changes

When the terraform root module contains any child module it requires `terraform init` to run to be able to successfully run the provider lock operation.
Previously, `terraform init` was in `terraform_providers_lock` hook too, but moved out to be only in `terraform_validate`, because there was little sense in trying to lock anything that was code invalid.
If we return `terraform init` back to `terraform_providers_lock` - major changes in providers that remove resources etc. can be successfully written to lockfile without any checks, as such checks done in `terraform_validate`
## Workaround till the release of that stuff
Add `files: (\.tf|\.tfvars|\.terraform\.lock\.hcl)$` to `terraform_validate` hook call
---
Co-authored-by: George L. Yermulnik <yz@yz.kiev.ua>terraform_providers_lock): Require terraform init (and terraform_validate hook) run when only lockfile changed (#649)1 parent 495357e commit 02c1935
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
0 commit comments