Private Provider Versions and Platforms API
These endpoints are only relevant to private providers. When you publish a private provider to the Terraform Cloud private registry, you must also create at least one version and at least one platform for that version before consumers can use the provider in configurations. Unlike the public Terraform Registry, the private registry does not automatically upload new releases. You must manually add new provider versions and the associated release files.
All members of an organization can view and use both public and private providers, but you need owners team or Manage Private Registry permissions to add, update, or delete provider versions and platforms in private registry.
Create a Provider Version
POST /organizations/:organization_name/registry-providers/:registry_name/:namespace/:name/versions
The private registry does not automatically update private providers when you release new versions. You must use this endpoint to add each new version. Consumers cannot use new versions until you upload all required release files and Create a Provider Platform.
Parameters
Parameter | Description |
---|---|
:organization_name | The name of the organization to create a provider in. The organization must already exist, and the token authenticating the API request must belong to the "owners" team or a member of the "owners" team. |
:registry_name | Must be private . |
:namespace | The namespace of the provider for which the version is being created. For private providers this is the same as the :organization_name parameter. |
:name | The name of the provider for which the version is being created. |
Creates a new registry provider version. This endpoint only applies to private providers.
Status | Response | Reason |
---|---|---|
201 | JSON API document (type: "registry-provider-versions" ) | Success |
422 | JSON API error object | Malformed request body (missing attributes, wrong types, etc.) |
403 | JSON API error object | Forbidden - not available for public providers |
404 | JSON API error object | User not authorized |
Request Body
This POST endpoint requires a JSON object with the following properties as a request payload.
Properties without a default value are required.
Key path | Type | Default | Description |
---|---|---|---|
data.type | string | Must be "registry-provider-versions" . | |
data.attributes.version | string | A valid semver version string. | |
data.attributes.key-id | string | A valid gpg-key string. | |
data.attributes.protocols | array | An array of Terraform provider API versions that this version supports. Must be one or all of the following values ["4.0","5.0","6.0"] . |
Note: Only Terraform 0.13 and later support third-party provider registries, and that Terraform version requires provider API version 5.0 or later. So you do not need to list major versions 4.0 or earlier in the protocols
attribute.
Sample Payload
Sample Request
Sample Response
Get All Versions for a Single Provider
GET /organizations/:organization_name/registry-providers/:registry_name/:namespace/:name/versions/
Parameters
Parameter | Description |
---|---|
:organization_name | The name of the organization the provider belongs to. |
:registry_name | Must be private . |
:namespace | The namespace of the provider. Must be the same as the organization_name for the provider. |
:name | The provider name. |
Status | Response | Reason |
---|---|---|
200 | JSON API document (type: "registry-providers" ) | Success |
403 | JSON API error object | Forbidden - public provider curation disabled |
404 | JSON API error object | Provider not found or user unauthorized to perform action |
Sample Request
Sample Response
Note: The shasums-uploaded
and shasums-sig-uploaded
properties will be false if those files have not been uploaded to Archivist. In this case, instead of including links to shasums-download
and shasums-sig-download
, the response will include upload links (shasums-upload
and shasums-sig-upload
).
Get a Version
GET /organizations/:organization_name/registry-providers/:registry_name/:namespace/:name/versions/:version
Parameters
Parameter | Description |
---|---|
:organization_name | The name of the organization the provider belongs to. |
:registry_name | Must be private . |
:namespace | The namespace of the provider. Must be the same as the organization_name for the provider. |
:name | The provider name. |
:version | The pversion of the provider being created to which different platforms can be added. |
Status | Response | Reason |
---|---|---|
200 | JSON API document (type: "registry-providers" ) | Success |
403 | JSON API error object | Forbidden - public provider curation disabled |
404 | JSON API error object | Provider not found or user unauthorized to perform action |
Sample Request
Sample Response
Note: shasums-uploaded
and shasums-sig-uploaded
will be false if those files haven't been uploaded to Archivist yet. In this case, instead of including links to shasums-download
and shasums-sig-download
, the response will include upload links (shasums-upload
and shasums-sig-upload
).
Delete a Version
DELETE /organizations/:organization_name/registry-providers/:registry_name/:namespace/:name/versions/:provider_version
Parameters
Parameter | Description |
---|---|
:organization_name | The name of the organization to delete a provider version from. The organization must already exist, and the token authenticating the API request must belong to the "owners" team or a member of the "owners" team. |
:registry_name | Must be private . |
:namespace | The namespace of the provider for which the version is being deleted. For private providers this is the same as the :organization_name parameter. |
:name | The name of the provider for which the version is being deleted. |
:version | The version for the provider that will be deleted along with its corresponding platforms. |
Status | Response | Reason |
---|---|---|
204 | No Content | Success |
403 | JSON API error object | Forbidden - public provider curation disabled |
404 | JSON API error object | Provider not found or user not authorized to perform action |
Sample Request
Create a Provider Platform
POST /organizations/:organization_name/registry-providers/:registry_name/:namespace/:name/versions/:version/platforms
Platforms are binaries that allow the provider to run on a particular operating system and architecture combination (e.g., Linux and AMD64). GoReleaser creates binaries automatically when you create a release on GitHub or create a release locally.
You must upload one or more platforms for each version of a private provider. After you create a platform, you must upload the platform binary file to the provider-binary-upload
URL.
Parameters
Parameter | Description |
---|---|
:organization_name | The name of the organization to create a provider platform in. The organization must already exist, and the token authenticating the API request must belong to the "owners" team or a member of the "owners" team. |
:registry_name | Must be private . |
:namespace | The namespace of the provider for which the platform is being created. For private providers this is the same as the :organization_name parameter. |
:name | The name of the provider for which the platform is being created. |
:version | The provider version of the provider for which the platform is being created. |
Creates a new registry provider platform. This endpoint only applies to private providers.
Status | Response | Reason |
---|---|---|
201 | JSON API document (type: "registry-provider-platforms" ) | Success |
422 | JSON API error object | Malformed request body (missing attributes, wrong types, etc.) |
403 | JSON API error object | Forbidden - not available for public providers |
404 | JSON API error object | User not authorized |
Request Body
This POST endpoint requires a JSON object with the following properties as a request payload.
Properties without a default value are required.
Key path | Type | Default | Description |
---|---|---|---|
data.type | string | Must be "registry-provider-platforms" . | |
data.attributes.os | string | A valid operating system string. | |
data.attributes.arch | string | A valid architecture string. | |
data.attributes.shasum | string | A valid shasum string. | |
data.attributes.filename | string | A valid filename string. |
Sample Payload
Sample Request
Sample Response
Get All Platforms for a Single Version
GET /organizations/:organization_name/registry-providers/:registry_name/:namespace/:name/versions/:version/platforms
Parameters
Parameter | Description |
---|---|
:organization_name | The name of the organization the provider belongs to. |
:registry_name | Must be private . |
:namespace | The namespace of the provider. Must be the same as the organization_name for the provider. |
:name | The provider name. |
:version | The version of the provider. |
Status | Response | Reason |
---|---|---|
200 | JSON API document (type: "registry-providers" ) | Success |
403 | JSON API error object | Forbidden - public provider curation disabled |
404 | JSON API error object | Provider not found or user unauthorized to perform action |
Sample Request
Sample Response
Note: The provider-binary-uploaded
property will be false
if that file has not been uploaded to Archivist. In this case, instead of including a link to provider-binary-download
, the response will include an upload link provider-binary-upload
.
Get a Platform
GET /organizations/:organization_name/registry-providers/:registry_name/:namespace/:name/versions/:version/platforms/:os/:arch
Parameters
Parameter | Description |
---|---|
:organization_name | The name of the organization the provider belongs to. |
:registry_name | Must be private . |
:namespace | The namespace of the provider. Must be the same as the organization_name for the provider. |
:name | The provider name. |
:version | The version of the provider. |
:os | The operating system of the provider platform. |
:arch | The architecture of the provider platform. |
Status | Response | Reason |
---|---|---|
200 | JSON API document (type: "registry-providers" ) | Success |
403 | JSON API error object | Forbidden - public provider curation disabled |
404 | JSON API error object | Provider not found or user unauthorized to perform action |
Sample Request
Sample Response
Note: The provider-binary-uploaded
property will be false
if that file has not been uploaded to Archivist. In this case, instead of including a link to provider-binary-download
, the response will include an upload link provider-binary-upload
.
Delete a Platform
DELETE /organizations/:organization_name/registry-providers/:registry_name/:namespace/:name/versions/:version/platforms/:os/:arch
Parameters
Parameter | Description |
---|---|
:organization_name | The name of the organization to delete a provider platform from. The organization must already exist, and the token authenticating the API request must belong to the "owners" team or a member of the "owners" team. |
:registry_name | Must be private . |
:namespace | The namespace of the provider for which the platform is being deleted. For private providers this is the same as the :organization_name parameter. |
:name | The name of the provider for which the platform is being deleted. |
:version | The version for which the platform is being deleted. |
:os | The operating system of the provider platform that is being deleted. |
:arch | The architecture of the provider platform that is being deleted. |
Status | Response | Reason |
---|---|---|
204 | No Content | Success |
403 | JSON API error object | Forbidden - public provider curation disabled |
404 | JSON API error object | Provider not found or user not authorized to perform action |
Sample Request