-1

When I call terraform destroy I will get following errors similar to the next one for any provider used.

Error: fork/exec /home/shura/code/devops/terragrunt/aws/eci-sandbox/eu-west-1/ops/dummy/.terragrunt-cache/J-_sukmO5D-z2WncfrbXY8hafRo/FQ4q4AgnhaqBBwSZgGy_ql6eP1Y/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.47.0_x4 : permission denied

There is no difference if use terraform directly or via terragrunt.

I can comment out all resources in the code and then terraform apply second time. It will destroy all resources no problem.

miroag
  • 11

1 Answers1

0

Turn out that the issue is related to configuration. I use Ubuntu 18.04 running inside VirtualBox to execute all commands, but the source code is stored on host Win10 and mounted into VM via shared folders. If I would move terraform and terragrunt caches out of the mounted file system, then everything starts to work.

effectively:

# tell terraform to use linux fs
echo 'plugin_cache_dir = "$HOME/.terraform.d/plugin-cache"' > ~/.terraformrc
# tell terragrunt to use linux fs
export TERRAGRUNT_DOWNLOAD=$HOME/.terragrunt.d

I would still be very much interested to hear what is the root cause. How use of mounted fs breaks providers?

miroag
  • 11