Terraform registry API documentation for extended providers endpoint features

Hi,

the HTTP Registry API documentation provides additional information about extended features of the modules endpoint that are not in the base Module Registry Protocol like getting the latest version of a module for a single provider.

In a PR for the tfupdate tool, I’m currently retrieving the latest version of a provider by querying the undocumented registry.terraform.io/v1/providers/:namespace/:type endpoint, e.g. https://registry.terraform.io/v1/providers/hashicorp/aws.

Can this be relied on?

Is there an equivalent documentation for extended providers endpoint features which are not in the base Provider Registry Protocol? If not, is it planned to document these already existing extended features?

1 Like

Hi @pdecat,

The “Module Registry Protocol” documentation describes what Terraform CLI depends on to do its installation work. The documentation for the API on registry.terraform.io includes some additional endpoints that are offered by that particular registry, but which Terraform CLI doesn’t use.

As long as you only intend to work with registry.terraform.io, everything in the documentation for its API is considered a public interface that you can use. Those additional operations will not necessarily be available on any other registry host, and so that might be problematic for a tool like tfupdate that I’d expect to work across all valid provider addresses.

For endpoints that aren’t mentioned in the documentation at all, I would not recommend using them because the Terraform Registry team has not committed to maintaining them.

1 Like

Hi @apparentlymart, thanks for confirming the absence of documentation is not just an oversight.

Good point. tfupdate currently only supports registry.terraform.io but that may change in the future so I’ll probably switch to using the official API.