Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a DEBUG mode #81

Closed
tpoindessous opened this issue Jul 22, 2022 · 3 comments · Fixed by #82
Closed

Add a DEBUG mode #81

tpoindessous opened this issue Jul 22, 2022 · 3 comments · Fixed by #82

Comments

@tpoindessous
Copy link

I try to re-install a provider that I already installed and then deleted and I got this :

$ m1-terraform-provider-helper install russellcardullo/pingdom -v 1.1.3
Getting provider data from terraform registry
Getting source code...
Compiling...
2022/07/22 11:59:59 rename /Users/thomas/tests/go/bin/terraform-provider-pingdom /Users/thomas/.terraform.d/plugins/registry.terraform.io/russellcardullo/pingdom/1.1.3/darwin_arm64/terraform-provider-pingdom_1.1.3_x5: no such file or directory

I'm trying to debug this but it would be a great help to have a debug mode 😄 I would like to have some detail about the first 3 lines.

Thanks !

And thanks for your work, it is really appreciated !

Have a nice day.

@tpoindessous
Copy link
Author

I just read about export TF_HELPER_LOG=debug.

Maybe could you please, add an --debug option which would do the same thing ?

Thanks !

@Junkern
Copy link
Contributor

Junkern commented Jul 22, 2022

What exactly would you expect to see in the debug logs?
If there is an error during any of the steps, it would log that error.
The error is that it cannot find the compiled terraform-provider-pingdom binary at the default location. (although I have to admit, that this error is not really clear. Will improve that in the next releases)

I took a deeper look at the provider and it seems like that the build command inside its Makefile specifies a non-default location: https://github.com/russellcardullo/terraform-provider-pingdom/blob/master/GNUmakefile#L10 (go build -o build/$(GOOS)_$(GOARCH)/$(PLUGIN_NAME)_$(TAG))

Funnily enough, I had an issue for exactly those cases but closed it 15 days ago, because no one reported an issue. You are the first one now 😄

@Junkern
Copy link
Contributor

Junkern commented Jul 22, 2022

For now you can correctly install the provider by passing a --custom-build-command "go install" to the install command. This places the binary at the correct default location

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants