Problem
When trying to create a private registry module using the API, the following error was received.
{"errors":[{"status":"404","title":"not found"}]}total 24
Cause
404 errors are usually indicative of not having the authority to complete the task. In this instance the token used did not offer enough permissions to create a module in the Private Module Registry
. The requirement is the token generated needs to be either a user token
or an owners team API token
generated from within the Team: owners' page
.
NOTE: The owners team is a special team that has implied access for all of your resources, but also has the ability to manage your organization
Solutions:
Follow these instructions on how to generate an owners Team API Token from within the Team: owners' page.
- Navigate to the teams page following this URL https://app.terraform.io/app/<ogranization-name>/settings/teams
-
Click on the
owners
team and it will redirect to the owners team page - Browse to the bottom of the page and generate a token in which will be a owners team token
Outcome
Retry the API sample request call with the owners team token. Using this type of token in the API's sample request to create the module in the private registry would provide the necessary create permissions and should not error with a 404 code, ultimately creating the module in the registry.