Problem
When attempting to publish a module to the Private Module Registry from a repository managed by Azure DevOps as a VCS provider, the operation fails with an Internal Server Error.
Cause
This error typically occurs when the user account performing the action lacks the necessary permissions within both Terraform Enterprise and the Azure DevOps organization or repositories.
Solution
To publish a module successfully, the user account requires specific administrative permissions in both Terraform Enterprise and Azure DevOps.
-
Terraform Enterprise Permissions: The user account must be a member of the
ownersteam within the organization. -
Azure DevOps Permissions: The same user account must have the following permissions in the Azure DevOps organization where the module code is stored:
- Be an organization owner.
- Be a member of the
Project Collection Administratorsgroup. - Be a member of the
Project Administratorsgroup for all projects containing repositories you want to publish as modules.
Being a member of the Project Administrators group grants the necessary permissions to clone, fetch, and explore repository contents, contribute to pull requests, and manage branches and tags.
Additional Information
For more details on managing access levels in Azure DevOps, refer to the official Microsoft documentation on Permissions and groups in Azure DevOps.