Unauthorized when deploying to the Terraform Module Registry

Problem to solve

I set up a new repo to publish a module to the terraform registry following the instructions at Terraform Module Registry | GitLab and using the provided CI template, but the deploy job results in a 401. I’m a Maintainer on the project.

Steps to reproduce

The setup has been so simple, there hasn’t been anything I could really test. It’s just the provided CI template in a new project containing a terraform module. I checked here for information on permissions, but the Terraform Module Registry isn’t mentioned specifically.

Configuration

include:
  template: Terraform-Module.gitlab-ci.yml

variables:
   TERRAFORM_MODULE_SYSTEM: google

Versions

  • Self-managed
  • GitLab.com SaaS
  • Self-hosted Runners

Versions

  • GitLab: 17.4.0-pre 76ade3e26a5
  • GitLab Runner: 16.11.1