Unable to get Terraform modules via packages API (and add version as a search filter)
Related to #348690.
Currently, it seems to be impossible to get the Terraform modules that have been uploaded to a project. Even with a number of modules in the registry (which are displayed in the UI), some with multiple versions, calling the GET endpoint for packages always returns an empty list:
❯ curl --header "PRIVATE-TOKEN: $GITLAB_TOKEN" --upload-file file.tgz "https://gitlab.mydomain.com/api/v4/projects/123/packages/terraform/modules/my-module/my-system/0.0.1/file"
{"message":"201 Created"}%
❯ curl --header "PRIVATE-TOKEN: $GITLAB_TOKEN" "https://gitlab.mydomain.com/api/v4/projects/123/packages"
[]%
While fixing this, can you also please consider adding the ability to filter the results of the GET by version which seems to be unsupported according to the current documentation (https://docs.gitlab.com/ee/api/packages.html).