Fix URLs generated for non-Hashicorp providers#39
Fix URLs generated for non-Hashicorp providers#39b-rad36 wants to merge 1 commit intominamijoyo:masterfrom
Conversation
|
@b-rad36 Thank you for the patch. I also forgot to consider unofficial community providers. I guess redirecting legacy URLs work only for backward compatibility before the registry exists and it doesn't work newly added community providers because there is no way to know their namespace. That is to say, depending on legacy URLs is not only fragile, but also never be comprehensive solution. I think a simple solution is adding a new flag such as An alternative is peeking into a lock file a.k.a |
Previous fix (0.7.2) for Resource/Data Doc URLs didn't work for non-Hashicorp providers. Hashicorp providers, like AWS, Azure, Kubernetes are now working but the non-Hashicorp URLs generated from
tfschema resource/data provider <name>are going to a 404 page.Example:
Creates the link:
https://registry.terraform.io/providers/hashicorp/okta/latest/docs/resources/groupThe correct link:
https://registry.terraform.io/providers/okta/okta/latest/docs/resources/groupNote that the URL should be using
/providers/okta/okta/and not/providers/hashicorp/okta/.This PR reverts the
docBaseURLconstant andbuildXDocURLfunctions to their previous format but with the.htmlsuffix removed for Data and Resource URLs.Verify that the following are working: