Skip to content

Commit

Permalink
docs: Improve workaround
Browse files Browse the repository at this point in the history
Relates: #203
  • Loading branch information
MaxymVlasov committed Sep 29, 2021
1 parent f9160b3 commit daaa6aa
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,17 @@ Example:
- --envs=AWS_SECRET_ACCESS_KEY="asecretkey"
```
3. It may happen that Terraform working directory (`.terraform`) already exists but not in the best condition (eg, not initialized modules, wrong version of Terraform, etc). To solve this problem you can find and delete all `.terraform` directories in your repository using this command:
3. It may happen that Terraform working directory (`.terraform`) already exists but not in the best condition (eg, not initialized modules, wrong version of Terraform, etc). To solve this problem you can find and delete all `.terraform` directories in your repository:
```shell
find . -type d -name ".terraform" -print0 | xargs -0 rm -r
```bash
echo "
function rm_terraform {
find . -name ".terraform*" -print0 | xargs -0 rm -r
}
alias rmtf=rm_terraform
" >>~/.bashrc
# Reload shell and use `rmtf` command in repo root
```
`terraform_validate` hook will try to reinitialize them before running `terraform validate` command.
Expand Down

0 comments on commit daaa6aa

Please sign in to comment.