You can publish Terraform modules to your GitLab project. And you can install them from your group or sub-group.
Problem to solve
The problem is that a Developer in Project A may create a module called foo and this prevents Developers in other projects from using the name foo. And if they try they'll receive an error but have no way of knowing which project originally created foo.
Proposal
In some cases, organizations may want to allow duplicate package name/version combinations. GitLab offers a setting for this for Maven and generic packages. We will do the same for Terraform modules.
Edited
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related or that one is blocking others.
Learn more.
A customer came accross "{message":"Access Denied"}" error when trying to publish a terraform module to a project with the name that already existed under a different project.
Another customer reported that they would have wanted to use this functionality. They assume that this was the default behavior so we had to learn from experiments that it doesn't work as the docs aren't very clear about this limitation
@trizzi would it be a good idea to do a docs MR to make that clearer until this issue is resolved?
would it be a good idea to do a docs MR to make that clearer until this issue is resolved?
@vstoianovici If the documentation update will make the situation clearer, I woudl say go for it. We could even reference this issue in the documentation.
Is there a way to find if this is the issue when receiving 403's in module push. I'm getting it in just one registry with a matching configuration to all others. I suspect this is the issue, but I don't know how to be sure.
Is there a way to list all module registries on a gitlab host, or anything above the individual project level?
@trizzi According to the docs for that API endpoint, the types returned by this endpoint are:
Filter the returned packages by type. One of conan, maven, npm, pypi, composer, nuget, helm, or golang. (Introduced in GitLab 12.9)
Nevertheless, I have access now to the API so I made an authenticated endpoint to this endpoint, and the packages for the whole group is empty, which seems inline with this endpoint not returning any terraform modules.
I'm still facing this issue on several repositories receiving access denied with their own CI token. I have no idea why, but I'm fairly confident is isn't a name collision. Any other ideas on how to sort out what is causing the issue?
Actually, package_type=terraform_module works just fine, but there don't seem to be any conflicts throughout the organization. I'm baffled at how I track town the source of the issue.
Guys, for the short term, can we at least make the error message even slightly more helpful and descriptive? This was a time vampire today. 900+ Ult Federal account.