Latest version of a provider-specific module in TF Registry API
What does this MR do and why?
Describe in detail what your merge request does and why.
Relates #344572 (closed)
Implement the endpoint packages/terraform/modules/v1/:module_namespace/:module_name/:module_system
which returns the latest version (if any) of a module for a single provider (`module_system).
Reuses the following components added in !90932 (merged)
-
Terraform::ModuleVersionPresenter
: Provides the required information to be returned in the response -
API::Entities::Terraform::ModuleVersion
: Expose the fields to be returned by the API response
Other Changes
- Fixed the api path for the Not Found scenario in
packages/terraform/modules/v1/:module_namespace/:module_name/:module_system/download
. It was incorrectly missing the group/namespace section in the URL
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Save a TF module in a repository registry
-
curl
thehttps://<base_url>/api/v4/packages/terraform/modules/v1/<module_namespace>/<module_name>/<module_provider>
endpoint
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.