terragrunt: Destination path already exists and is not an empty directory using --terragrunt-source-update
Hi everyone,
We have experienced the following error while trying to run terragrunt plan-all --terragrunt-source-update --terragrunt-non-interactive --terragrunt-include-external-dependencies
error downloading ‘ssh://git@github.com/project-terragrunt/secrets’: /usr/bin/git exited with 128: fatal: destination path ‘…project-terragrunt/secrets/.terragrunt-cache/M062klXZFj2B2dKtXGow5FueqdY/ZS8XBy97Un6SDm3LMf87-Dx8xEY’ already exists and is not an empty directory.
Our project has the following structure:
...
├── lambda
│ ├── LambdaA
│ │ └── terragrunt.hcl
│ ├── LambdaB
│ └── terragrunt.hcl
├── secrets
│ └── terragrunt.hcl
...
And we were trying to execute the command in the lambda folder.
LambdaA and LambdaB have:
terraform {
source = "git::git@github.com:project-terraform//lambda/LambdaA?ref=branch"
}
dependency "secret" {
config_path = "../../secrets"
}
We are currently avoiding this issue changing the reference to a certain commit and removing the flag --terragrunt-source-update, so we think the problem should be in the cache folder cleanup.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20 (10 by maintainers)
Commits related to this issue
- Add regression test for issue #906 — committed to gruntwork-io/terragrunt by yorinasub17 5 years ago
after upgrading to the new version of terragrunt it is suddenly started to work 😃 terragrunt version v0.21.5 Terraform v0.12.13
I can confirm that the issue is solved. Thank you for your patience and time!!!