Open mohammed-rahib opened 2 days ago
Hello,
the issue you're encountering is most likely due to a conflict between the provider.tf
file generated by Terragrunt and the one already present in the source module (RaJiska/terraform-aws-fck-nat
). When Terragrunt runs, it attempts to generate its own provider.tf
file, but since the module you’re using already includes a provider.tf
file, this results in a file conflict.
So change the generated file name or set the disable = true
flag for some cases
While using public modules (specifically, https://github.com/RaJiska/terraform-aws-fck-nat.git), I'm encountering an error stating that
provider.tf
already exists and was not generated by Terragrunt.Error recieved
terragrunt init 13:23:43.101 INFO Downloading Terraform configurations from tfr:///RaJiska/fck-nat/aws?version=1.3.0 into ./.terragrunt-cache/7PDGbKpQSS1k8QdM8xNxSXrieYo/8N-KqRI-VyYh5gnNmgyJJ-dzYx4 13:23:44.855 ERROR ERROR: The file path ./.terragrunt-cache/7PDGbKpQSS1k8QdM8xNxSXrieYo/8N-KqRI-VyYh5gnNmgyJJ-dzYx4/provider.tf already exists and was not generated by terragrunt. 13:23:44.857 ERROR Can not generate terraform file: ./.terragrunt-cache/7PDGbKpQSS1k8QdM8xNxSXrieYo/8N-KqRI-VyYh5gnNmgyJJ-dzYx4/provider.tf already exists 13:23:44.858 ERROR Unable to determine underlying exit code, so Terragrunt will exit with error code 1
Versions
Additional context
If I delete the specified provider file from the cache and then run terragrunt init, it works fine, but it doesn't function correctly the first time.