terraformer: plugin error 1: open /Users/me/.terraform.d/plugins/darwin_amd64: no such file or directory [Terraform Version v0.13.0]
I am seeing the same issue as indicated in https://github.com/GoogleCloudPlatform/terraformer/issues/184 when using terraformer with plugins initiated by terraform v0.13.0
brew uninstall terraformer && brew install terraformer(version 0.8.8 installed)- Make directory, cd
- init.tf:
provider "google" {
version = "~> 3.35"
project_id = "credible-torus-262216"
}
terraform initterraformer import google ...
2020/08/22 00:32:34 google importing...
2020/08/22 00:32:35 open /Users/me/.terraform.d/plugins/darwin_amd64: no such file or directory
Terraform version:
Terraform v0.13.0
+ provider registry.terraform.io/hashicorp/google v3.35.0
Note that this error does not occur for previous versions of terraform, e.g.
Terraform v0.12.10
+ provider.google v3.35.0
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 19
- Comments: 30 (3 by maintainers)
Commits related to this issue
- #590 Terraform 0.13 support — committed to meshuga/terraformer by meshuga 4 years ago
- #590 removed init.tf — committed to meshuga/terraformer by meshuga 4 years ago
- #590 code review — committed to meshuga/terraformer by meshuga 4 years ago
- #590 Terraform 0.13 support — committed to VaishnaviGopal/terraformer by meshuga 4 years ago
- #590 removed init.tf — committed to VaishnaviGopal/terraformer by meshuga 4 years ago
- #590 code review — committed to VaishnaviGopal/terraformer by meshuga 4 years ago
Here’s what I had to do in order to get it working.
Idk if anyone is still wrestling with this issue, but the following fixed it for me with versions
0.12.31,0.13.2and0.14.8. It seems you just need a new directory, with a versions file in it. E.g.:Why it’s closed? The issue is here
@jjorissen52 give
brew uninstall terraformerandbrew install --HEAD terraformera shot, I fixed the head build recently.In my case using MacOS Ventura 13.0 on Apple M1, thanks to @peterdeme’s comment, I have created
providers.tfin the folder I’m working in and put the provider (awsin my case)and then ran
and finally ran the
terraformer import aws ...and everything worked smoothly.Is there any way to get this plugin working with Terraform v0.13?
I believe that the issue stems from the fact that Terrafrom 0.13+ installs plugins to a different path than Terraform < 0.13.
This is still an issue on terraform 1.0 & terraformer v0.8.14even after applying the above-mentioned workaround:
brew uninstall terraformerandbrew install --HEAD terraformerthank you, work like a charm
Similar but slightly different. Running the following version:
Steps I took:
Add provider you need (in this case
newrelic/newrelicto a.tffile and runterraform initCreate plugin directory
Copy provider that was imported in step 1
This didn’t work with me using terraform 0.14.
https://github.com/GoogleCloudPlatform/terraformer/issues/1171
You need to run
terraform initfirstThis worked for me with terraform 0.13 and latest terraformer. The file shouldn’t be renamed though, otherwise it causes
Can't find provider versionwarning when callingterraformer import plan.The issue might be here:
https://github.com/GoogleCloudPlatform/terraformer/blob/8be92a9f59e1b551fdda1cf6a6191fdaff0547e9/terraformutils/providerwrapper/provider.go#L244
This seems to assume to search in a flat structure here:
.terraform/plugins/darwin_amd64But in reality in 0.13 this should now be searching through a registry structure, so now the provider appears here (using azurerm as an example):
.terraform/plugins/registry.terraform.io/hashicorp/azurerm/2.20.0/darwin_amd64So this code just needs to be updated to account for this new registry/version structure I believe.
More details here:
https://www.terraform.io/upgrade-guides/0-13.html#new-filesystem-layout-for-local-copies-of-providers
Worked for me too! thanks! 😃
If you’re on a silicon mac, note this will be
darwin_arm64and notdarwin_amd64This it worked for me in
terraform 1.1 && terraformer 0.8… Thank youthe issue is still there when execute the terraformer import with google provider. fork/exec : no such file or directory
with latest terraform version:V1.01 on Darwin_amd64, Terraformer version:V0.8.15
To ensure backwards compatibility, the tool should check two paths. Thanks for the feedback!
Yesterday I found out Terraform changed how they define version definition in 0.13 - https://www.terraform.io/docs/configuration/provider-requirements.html Started working on the change.
Appreciate feedback. Confirming that this is indeed the case. Moving Terraform to latest 0.12.29 changed the terraformer behavior. Good as a work around, however, probably this issue needs attention in a future.
To me, the issue was that my Terraform was an arm64 binary and Terraformer was amd64.
I downloaded the darwin-arm64 image and it fixed it. Although it’s pretty huge (380mb)
edit: Oh and the other reason is that
hashicorp/awsmodule is not initialized. You need to addhashicorp/awsintoproviders.tf(or whatever file) and thenterraform init.I just tried to use terraformer on WSL2 and I got this error. I’m using latest release from github.