Problem
When using the GPG Keys API to create a GPG key for a private provider, Terraform Enterprise may return a 404 not found error.
{
"errors": [
{
"status": "404",
"title": "not found"
}
]
}Prerequisites
- Terraform Enterprise versions prior to
v202203-1.
Cause
The API endpoint for managing GPG keys, /api/registry/private/v2/gpg-keys, was introduced in Terraform Enterprise version v202203-1. In earlier versions, this endpoint does not exist, causing the API to return a 404 not found error when you attempt to use it.
Solution
To resolve this issue, you must upgrade Terraform Enterprise to version v202203-1 or a newer release. Support for private providers in the Private Registry was introduced in this version.
For a complete list of features and updates in this release, refer to the v202203-1 release notes.
Outcome
After upgrading Terraform Enterprise to version v202203-1 or newer, you can successfully use the GPG Keys API to add a key and publish a private provider to the Private Registry.