5
votes

I was trying to build a custom Terraform provider by following the tutorial on this site:

https://www.terraform.io/docs/extend/writing-custom-providers.html

I executed terraform init and that went well.

However, executing terraform plan gives the following error:

Error: Failed to instantiate provider "example" to obtain schema: exec: "C:\Users\myname\go\src\terraform-provider-example\terraform-provider-example": file does not exist

The terraform-provider-example file is present in the working directory where i am executing terraform plan

Has anyone faced this issue? Please help!

1
Could it be version/installation mismatch? I.e. you are executing a Terraform which doesn't have your plugin installed?Grzegorz Oledzki
@GrzegorzOledzki This is a custom plugin - I'm writing it and want to test it. The same thing works perfectly on Ubuntu.pep8
Exactly. I am not an expert in Terraform, but it looks like the terraform you are running is not the same Terraform you are building (or their plugin sets).Grzegorz Oledzki

1 Answers

8
votes

rename you provider with ".exe" suffix on windows environment