Problem
When using the GPG Keys API to create a GPG Key as part of the workflow for creating a private provider for the Private Registry, Terraform Enterprise versions prior to v202203-1 may return a 404 error.
{"errors":[{"status":"404","title":"not found"}]}
Prerequisites
All Terraform Enterprise version pre v202203-1 releases.
Cause
- Creating Private providers for the private registry is only supported on Terraform Enterprise versions v202203-1 or above.
- The API call to this endpoint /api/registry/private/v2/gpg-keys mentioned in add gpg-keys doc is only accessible in TFE versions v202203-1 or above.
- Proceeding Terraform Enterprise versions may experience the following error when attempting to add a gpg key for a private provider using the aforementioned endpoint:
{"errors":[{"status":"404","title":"not found"}]}
Solutions:
Private providers are now supported in the Private Registry for the TFE release v202203-1 which would require an upgrade if running on any Terraform Enterprise prior to that.
For an entire list of the new updates/features and specific statements for the private provider module please review the Release Notes.
Outcome
Running Terraform Enterprise version at a minimum of TFE release v202203-1 should accomplish adding a gpg key and further the efforts to publishing a private provider in the Private Registry.
Additional Information
- For additional assistance please contact HashiCorp Support to request additional assistance.