I’ve followed the instructions in the readme here https://github.com/terraform-providers/terraform-provider-azurerm for building a small change to the provider. I have the binary correctly output to $GOPATH/bin/terraform-provider-azurerm now I want to test and see if my change fixes my problem.
Reading the following document https://www.terraform.io/docs/extend/how-terraform-works.html#discovery it sounds like I should be able to run terraform init -plugin-dir=$GOPATH/bin
but I get the following output
$ terraform init -plugin-dir=$GOPATH/bin
Initializing the backend...
Initializing provider plugins...
- Finding latest version of hashicorp/azurerm...
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider
hashicorp/azurerm: provider registry.terraform.io/hashicorp/azurerm was not
found in any of the search locations
- /home/jshare/go/bin
I’ve also tried copying the binary to .
and to terraform.d/plugins/linux_amd64/
both of which the above document claim should be searched before downloading, but no success.
I feel like I’m missing something basic in the docs. Anyone able to point me in the right direction?