-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Actionable error message for a missing repo (#1388)
Fixes #1365 The current warning for failing to find the source repo (always due to misconfigured `ProviderInfo`) looks like this (1 line per resource/datasoruce): ``` $ pulumi-acme/bin/pulumi-tfgen-acme schema --out provider/cmd/pulumi-resource-acme warning: could not find docs for resource 'acme_certificate'. Override the Docs property in the resource mapping. See type tfbridge.DocInfo for details. warning: could not find docs for resource 'acme_registration'. Override the Docs property in the resource mapping. See type tfbridge.DocInfo for details. ``` This PR changes the error message to look like this: ``` warning: Unable to find the upstream provider's documentation: The upstream repository is expected to be at "github.com/vancluever/terraform-provider-acme". If the expected path is not correct, you should check the values of these fields (current values shown): tfbridge.ProviderInfo{ GitHubHost: "github.com", GitHubOrg: "vancluever", Name: "acme", TFProviderModuleVersion: "", } The original error is: error running 'go mod download -json github.com/vancluever/terraform-provider-acme' in "/Users/ianwahbe/go/src/github.com/pulumiverse/pulumi-acme/provider" dir for module: exit status 1 Output: { "Path": "github.com/vancluever/terraform-provider-acme", "Error": "module github.com/vancluever/terraform-provider-acme: not a known dependency" } ``` This error message will appear once, regardless of how many resources/datasources are in the provider. --- For review: - e568cc4 creates the new error. - 1ae3dd6 catches the new error and displays the warning.
- Loading branch information
Showing
2 changed files
with
90 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters