When listing a module/provider versions, there’s no “publication information” attached, as the version creation date-time for instance.
This would be useful when one would want to list module/providers versions published in the last X days for example (which, coincidentally, is the use-case we have at my company)
It seems this information is accessible through an undocumented “v2” API when browsing registry.terraform.io but it’s not a “standard” way, which makes it impossible to do the same with other implementations (gitlab.com for example)
Is there a “standard” way to get this information i missed out, and if not, would it be possible to be added to the Terraform Registry API documentation and possibly requiring implementations to have it ? (in a v2 API or something idk), or is it for the moment out of question in order to not break API compatibility and stuff?
Since you are talking about “other implementations” I assume you are talking about the module registry protocol and the provider registry protocol, as opposed to the Terraform Registry API which is only for
The two registry protocols document the minimum possible API that Terraform’s own module and provider installer needs to successfully install a module. Those protocols are not intended for any other purpose except for Terraform to install providers and modules.
There is no “standard” API for anything else because Terraform itself has no need for it. Each registry might define its own way to export metadata about modules, but we don’t wish to burden registry implementers with having to return extra data that Terraform itself won’t use. Unless Terraform itself uses something, we cannot really “require” it, because we have no power over third-party implementations of these protocols.
The Terraform Registry API (specific to
registry.terraform.io) does track additional metadata as you’ve seen. Its Get a Specific Module operation returns the publication date for the latest release, for example.
Third-party module registry implementations could choose to implement API endpoints compatible with
registry.terraform.io’s extended API, but HashiCorp cannot force any third-party implementer to do so.