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

Go Generate fails with "Failed to load plugin schemas" #167

Open
independentid opened this issue Jul 3, 2022 · 3 comments
Open

Go Generate fails with "Failed to load plugin schemas" #167

independentid opened this issue Jul 3, 2022 · 3 comments

Comments

@independentid
Copy link

Whether on the desktop or in the workflow setup by the Terraform Plugin Framework template, the following error occurs when generating docs (this from the workflow template):

  go generate ./...
3  shell: /usr/bin/bash -e {0}
4 examples/hexa-demo/gcp-iap-cloudrun/main.tf
5 rendering website for provider "terraform-provider-hexa" (as "terraform-provider-hexa")
6 exporting schema from Terraform
7 compiling provider "hexa"
8 using Terraform CLI binary from PATH if available, otherwise downloading latest Terraform CLI binary
9 running terraform init
10 getting provider schema
11 Error executing command: unable to generate website: exit status 1
12 
13 Error: Failed to load plugin schemas
14
15 Error while loading schemas for plugin components: Failed to obtain provider
16 schema: Could not load the schema for provider
17 registry.terraform.io/hashicorp/hexa: failed to instantiate provider
18 "registry.terraform.io/hashicorp/hexa" to obtain schema: Unrecognized remote
19 plugin message: Provider started. To attach Terraform CLI, set the
20 TF_REATTACH_PROVIDERS environment variable with the following:
21 
22 This usually means that the plugin is either invalid or simply
23 needs to be recompiled to support the latest protocol...
24
25
26
27 exit status 1
28 main.go:20: running "go": exit status 1
29 Error: Process completed with exit code 1.

It is not clear if the workflow has a TF_REATTACH_PROVIDERS issue. On the desktop I have tried both ways.

Also, note that the schema being searched for is: "registry.terraform.io/hashicorp/hexa" rather than "registry.terraform.io/hexa-org/hexa".

It is not clear in the documentation or the error if there is a mis-configuration, or other issue.

This error may be related to Issue #141

@independentid
Copy link
Author

I have found the cause of the issue. In main, the plugin address will not accept a "-" in the organization name.
This works:
Address: "registry.terraform.io/hexaorg/hexa"
This does not:
Address: "registry.terraform.io/hexa-org/hexa"

Suggest a diagnostic error for the naming problem or allow for dashes rather than defaulting to "hashicorp".

@lrstanley
Copy link

Hello @independentid, if #174 is merged, I believe it will properly report the error from the terraform cli in situations like this, where a - is invalid in the organization name.

@richierockskool
Copy link

I have the same error, what should I do?

https://registry.npmjs.org/homebridge-inkbird-wifi-gateway

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

No branches or pull requests

3 participants