I am trying to write my own first terraform providers. Step by step followed the blog itemized below:
I can compile “terraform-provider-example” via "
go build -o terraform-provider-example" command successfully.
The problem is that no way for me to call(Invoke) the new provider named “terraform-provider-example”. The error occurred like :
robertqiu@ROBERTQIU-MB2 studyBasicGoProject % terraform init Initializing the backend... Initializing provider plugins... - Finding latest version of hashicorp/example... ╷ │ Error: Failed to query available provider packages │ │ Could not retrieve the list of available versions for provider hashicorp/example: provider registry registry.terraform.io does not have a provider named registry.terraform.io/hashicorp/example │ │ All modules should specify their required_providers so that external consumers will get the correct providers when using a module. To see which modules are currently depending on hashicorp/example, run the following command: │ terraform providers ╵
Seems that the located provider can NOT be found by terraform. Anyone can help with that?