• HashiCorp Developer

  • HashiCorp Cloud Platform
  • Terraform
  • Packer
  • Consul
  • Vault
  • Boundary
  • Nomad
  • Waypoint
  • Vagrant
Terraform
  • Install
  • Tutorials
    • About the Docs
    • Configuration Language
    • Terraform CLI
    • Terraform Cloud
    • Terraform Enterprise
    • CDK for Terraform
    • Provider Use
    • Plugin Development
    • Registry Publishing
    • Integration Program
  • Registry(opens in new tab)
  • Try Cloud(opens in new tab)
  • Sign up
Terraform Home

Terraform Cloud

Skip to main content
  • Terraform Cloud
  • Plans and Features
  • Getting Started
    • Overview
    • Account
    • Agent Pools
    • Agent Tokens
    • Applies
    • Audit Trails
    • Assessment Results
    • Comments
    • Configuration Versions
    • Cost Estimates
    • Feature Sets
    • Invoices
    • IP Ranges
    • Notification Configurations
    • OAuth Clients
    • OAuth Tokens
    • Organizations
    • Organization Memberships
    • Organization Tags
    • Organization Tokens
    • Plan Exports
    • Plans
    • Policies
    • Policy Checks
    • Policy Sets
    • Policy Set Parameters
      • Modules
      • Providers
      • Private Provider Versions and Platforms
      • GPG Keys
    • Projects
    • Project Team Access
    • Runs
    • Run Triggers
    • SSH Keys
    • State Versions
    • State Version Outputs
    • Subscriptions
    • Team Membership
    • Team Tokens
    • Teams
    • User Tokens
    • Users
    • Variables
    • VCS Events
    • Workspaces
    • Workspace-Specific Variables
    • Workspace Team Access
    • Workspace Resources
    • Variable Sets
    • Changelog
    • Stability Policy
  • Migrating to Terraform Cloud

  • Terraform Cloud Agents

  • Resources

  • Tutorial Library
  • Certifications
  • Community Forum
    (opens in new tab)
  • Support
    (opens in new tab)
  • GitHub
    (opens in new tab)
  • Terraform Registry
    (opens in new tab)
  1. Developer
  2. Terraform
  3. Terraform Cloud
  4. API
  5. Private Registry
  6. Private Provider Versions and Platforms

»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

ParameterDescription
:organization_nameThe 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_nameMust be private.
:namespaceThe namespace of the provider for which the version is being created. For private providers this is the same as the :organization_name parameter.
:nameThe name of the provider for which the version is being created.

Creates a new registry provider version. This endpoint only applies to private providers.

StatusResponseReason
201JSON API document (type: "registry-provider-versions")Success
422JSON API error objectMalformed request body (missing attributes, wrong types, etc.)
403JSON API error objectForbidden - not available for public providers
404JSON API error objectUser 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 pathTypeDefaultDescription
data.typestringMust be "registry-provider-versions".
data.attributes.versionstringA valid semver version string.
data.attributes.key-idstringA valid gpg-key string.
data.attributes.protocolsarrayAn 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

{
  "data": {
    "type": "registry-provider-versions",
    "attributes": {
      "version": "3.1.1",
      "key-id": "32966F3FB5AC1129",
      "protocols": ["5.0"]
    }
  }
}

Sample Request

curl \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/vnd.api+json" \
  --request POST \
  --data @payload.json \
  https://app.terraform.io/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions

Sample Response

{
  "data": {
    "id": "provver-y5KZUsSBRLV9zCtL",
    "type": "registry-provider-versions",
    "attributes": {
      "version": "3.1.1",
      "created-at": "2022-02-11T19:16:59.876Z",
      "updated-at": "2022-02-11T19:16:59.876Z",
      "key-id": "32966F3FB5AC1129",
      "protocols": ["5.0"],
      "permissions": {
        "can-delete": true,
        "can-upload-asset": true
      },
      "shasums-uploaded": false,
      "shasums-sig-uploaded": false
    },
    "relationships": {
      "registry-provider": {
        "data": {
          "id": "prov-cmEmLstBfjNNA9F3",
          "type": "registry-providers"
        }
      },
      "platforms": {
        "data": [],
        "links": {
          "related": "/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions/3.1.1/platforms"
        }
      }
    },
    "links": {
      "shasums-upload": "https://archivist.terraform.io/v1/object/dmF1b...",
      "shasums-sig-upload": "https://archivist.terraform.io/v1/object/dmF1b..."
    }
  }
}

Get All Versions for a Single Provider

GET /organizations/:organization_name/registry-providers/:registry_name/:namespace/:name/versions/

Parameters

ParameterDescription
:organization_nameThe name of the organization the provider belongs to.
:registry_nameMust be private.
:namespaceThe namespace of the provider. Must be the same as the organization_name for the provider.
:nameThe provider name.
StatusResponseReason
200JSON API document (type: "registry-providers")Success
403JSON API error objectForbidden - public provider curation disabled
404JSON API error objectProvider not found or user unauthorized to perform action

Sample Request

curl \
  --request GET \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/vnd.api+json" \
  https://app.terraform.io/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions

Sample Response

{
  "data": [
    {
      "id": "provver-y5KZUsSBRLV9zCtL",
      "type": "registry-provider-versions",
      "attributes": {
        "version": "3.1.1",
        "created-at": "2022-02-11T19:16:59.876Z",
        "updated-at": "2022-02-11T19:16:59.876Z",
        "key-id": "32966F3FB5AC1129",
        "protocols": ["5.0"],
        "permissions": {
          "can-delete": true,
          "can-upload-asset": true
        },
        "shasums-uploaded": true,
        "shasums-sig-uploaded": true
      },
      "relationships": {
        "registry-provider": {
          "data": {
            "id": "prov-cmEmLstBfjNNA9F3",
            "type": "registry-providers"
          }
        },
        "platforms": {
          "data": [
            {
              "id": "provpltfrm-GSHhNzptr9s3WoLD",
              "type": "registry-provider-platforms"
            },
            {
              "id": "provpltfrm-A1PHitiM2KkKpVoM",
              "type": "registry-provider-platforms"
            },
            {
              "id": "provpltfrm-BLJWvWyJ2QMs525k",
              "type": "registry-provider-platforms"
            },
            {
              "id": "provpltfrm-qQYosUguetYtXGzJ",
              "type": "registry-provider-platforms"
            },
            {
              "id": "provpltfrm-pjDHFN46y193bS7t",
              "type": "registry-provider-platforms"
            }
          ],
          "links": {
            "related": "/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions/3.1.1/platforms"
          }
        }
      },
      "links": {
        "shasums-download": "https://archivist.terraform.io/v1/object/dmF1b...",
        "shasums-sig-download": "https://archivist.terraform.io/v1/object/dmF1b..."
      }
    }
  ],
  "links": {
    "self": "https://app.terraform.io/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions?page%5Bnumber%5D=1&page%5Bsize%5D=20",
    "first": "https://app.terraform.io/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions?page%5Bnumber%5D=1&page%5Bsize%5D=20",
    "prev": null,
    "next": null,
    "last": "https://app.terraform.io/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions?page%5Bnumber%5D=1&page%5Bsize%5D=20"
  },
  "meta": {
    "pagination": {
      "current-page": 1,
      "page-size": 20,
      "prev-page": null,
      "next-page": null,
      "total-pages": 1,
      "total-count": 1
    }
  }
}

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

ParameterDescription
:organization_nameThe name of the organization the provider belongs to.
:registry_nameMust be private.
:namespaceThe namespace of the provider. Must be the same as the organization_name for the provider.
:nameThe provider name.
:versionThe pversion of the provider being created to which different platforms can be added.
StatusResponseReason
200JSON API document (type: "registry-providers")Success
403JSON API error objectForbidden - public provider curation disabled
404JSON API error objectProvider not found or user unauthorized to perform action

Sample Request

curl \
  --request GET \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/vnd.api+json" \
  https://app.terraform.io/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions/3.1.1

Sample Response

{
  "data": {
    "id": "provver-y5KZUsSBRLV9zCtL",
    "type": "registry-provider-versions",
    "attributes": {
      "version": "3.1.1",
      "created-at": "2022-02-11T19:16:59.876Z",
      "updated-at": "2022-02-11T19:16:59.876Z",
      "key-id": "32966F3FB5AC1129",
      "protocols": ["5.0"],
      "permissions": {
        "can-delete": true,
        "can-upload-asset": true
      },
      "shasums-uploaded": true,
      "shasums-sig-uploaded": true
    },
    "relationships": {
      "registry-provider": {
        "data": {
          "id": "prov-cmEmLstBfjNNA9F3",
          "type": "registry-providers"
        }
      },
      "platforms": {
        "data": [
          {
            "id": "provpltfrm-GSHhNzptr9s3WoLD",
            "type": "registry-provider-platforms"
          },
          {
            "id": "provpltfrm-A1PHitiM2KkKpVoM",
            "type": "registry-provider-platforms"
          },
          {
            "id": "provpltfrm-BLJWvWyJ2QMs525k",
            "type": "registry-provider-platforms"
          },
          {
            "id": "provpltfrm-qQYosUguetYtXGzJ",
            "type": "registry-provider-platforms"
          },
          {
            "id": "provpltfrm-pjDHFN46y193bS7t",
            "type": "registry-provider-platforms"
          }
        ],
        "links": {
          "related": "/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions/3.1.1/platforms"
        }
      }
    },
    "links": {
      "shasums-download": "https://archivist.terraform.io/v1/object/dmF1b...",
      "shasums-sig-download": "https://archivist.terraform.io/v1/object/dmF1b..."
    }
  }
}

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

ParameterDescription
:organization_nameThe 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_nameMust be private.
:namespaceThe namespace of the provider for which the version is being deleted. For private providers this is the same as the :organization_name parameter.
:nameThe name of the provider for which the version is being deleted.
:versionThe version for the provider that will be deleted along with its corresponding platforms.
StatusResponseReason
204NothingSuccess
403JSON API error objectForbidden - public provider curation disabled
404JSON API error objectProvider not found or user not authorized to perform action

Sample Request

curl \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/vnd.api+json" \
  --request DELETE \
  https://app.terraform.io/api/v2/organizations/hashicorp/registry-providers/public/hashicorp/aws/versions/3.1.1

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

ParameterDescription
:organization_nameThe 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_nameMust be private.
:namespaceThe namespace of the provider for which the platform is being created. For private providers this is the same as the :organization_name parameter.
:nameThe name of the provider for which the platform is being created.
:versionThe 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.

StatusResponseReason
201JSON API document (type: "registry-provider-platforms")Success
422JSON API error objectMalformed request body (missing attributes, wrong types, etc.)
403JSON API error objectForbidden - not available for public providers
404JSON API error objectUser 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 pathTypeDefaultDescription
data.typestringMust be "registry-provider-platforms".
data.attributes.osstringA valid operating system string.
data.attributes.archstringA valid architecture string.
data.attributes.shasumstringA valid shasum string.
data.attributes.filenamestringA valid filename string.

Sample Payload

{
  "data": {
    "type": "registry-provider-version-platforms",
    "attributes": {
      "os": "linux",
      "arch": "amd64",
      "shasum": "8f69533bc8afc227b40d15116358f91505bb638ce5919712fbb38a2dec1bba38",
      "filename": "terraform-provider-aws_3.1.1_linux_amd64.zip"
    }
  }
}

Sample Request

curl \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/vnd.api+json" \
  --request POST \
  --data @payload.json \
  https://app.terraform.io/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions/3.1.1/platforms

Sample Response

{
  "data": {
    "id": "provpltfrm-BLJWvWyJ2QMs525k",
    "type": "registry-provider-platforms",
    "attributes": {
      "os": "linux",
      "arch": "amd64",
      "filename": "terraform-provider-aws_3.1.1_linux_amd64.zip",
      "shasum": "8f69533bc8afc227b40d15116358f91505bb638ce5919712fbb38a2dec1bba38",
      "permissions": {
        "can-delete": true,
        "can-upload-asset": true
      },
      "provider-binary-uploaded": false
    },
    "relationships": {
      "registry-provider-version": {
        "data": {
          "id": "provver-y5KZUsSBRLV9zCtL",
          "type": "registry-provider-versions"
        }
      }
    },
    "links": {
      "provider-binary-upload": "https://archivist.terraform.io/v1/object/dmF1b..."
    }
  }
}

Get All Platforms for a Single Version

GET /organizations/:organization_name/registry-providers/:registry_name/:namespace/:name/versions/:version/platforms

Parameters

ParameterDescription
:organization_nameThe name of the organization the provider belongs to.
:registry_nameMust be private.
:namespaceThe namespace of the provider. Must be the same as the organization_name for the provider.
:nameThe provider name.
:versionThe version of the provider.
StatusResponseReason
200JSON API document (type: "registry-providers")Success
403JSON API error objectForbidden - public provider curation disabled
404JSON API error objectProvider not found or user unauthorized to perform action

Sample Request

curl \
  --request GET \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/vnd.api+json" \
  https://app.terraform.io/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions/3.1.1/platforms

Sample Response

{
  "data": [
    {
      "id": "provpltfrm-GSHhNzptr9s3WoLD",
      "type": "registry-provider-platforms",
      "attributes": {
        "os": "darwin",
        "arch": "amd64",
        "filename": "terraform-provider-aws_3.1.1_darwin_amd64.zip",
        "shasum": "fd580e71bd76d76913e1925f2641be9330c536464af9a08a5b8994da65a26cbc",
        "permissions": {
          "can-delete": true,
          "can-upload-asset": true
        },
        "provider-binary-uploaded": true
      },
      "relationships": {
        "registry-provider-version": {
          "data": {
            "id": "provver-y5KZUsSBRLV9zCtL",
            "type": "registry-provider-versions"
          }
        }
      },
      "links": {
        "provider-binary-download": "https://archivist.terraform.io/v1/object/dmF1b..."
      }
    },
    {
      "id": "provpltfrm-A1PHitiM2KkKpVoM",
      "type": "registry-provider-platforms",
      "attributes": {
        "os": "darwin",
        "arch": "arm64",
        "filename": "terraform-provider-aws_3.1.1_darwin_arm64.zip",
        "shasum": "de3c351d7f35a3c8c583c0da5c1c4d558b8cea3731a49b15f63de5bbbafc0165",
        "permissions": {
          "can-delete": true,
          "can-upload-asset": true
        },
        "provider-binary-uploaded": true
      },
      "relationships": {
        "registry-provider-version": {
          "data": {
            "id": "provver-y5KZUsSBRLV9zCtL",
            "type": "registry-provider-versions"
          }
        }
      },
      "links": {
        "provider-binary-download": "https://archivist.terraform.io/v1/object/dmF1b..."
      }
    }
  ],
  "links": {
    "self": "https://app.terraform.io/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions/3.1.1/platforms?page%5Bnumber%5D=1&page%5Bsize%5D=20",
    "first": "https://app.terraform.io/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions/3.1.1/platforms?page%5Bnumber%5D=1&page%5Bsize%5D=20",
    "prev": null,
    "next": null,
    "last": "https://app.terraform.io/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions/3.1.1/platforms?page%5Bnumber%5D=1&page%5Bsize%5D=20"
  },
  "meta": {
    "pagination": {
      "current-page": 1,
      "page-size": 20,
      "prev-page": null,
      "next-page": null,
      "total-pages": 1,
      "total-count": 2
    }
  }
}

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

ParameterDescription
:organization_nameThe name of the organization the provider belongs to.
:registry_nameMust be private.
:namespaceThe namespace of the provider. Must be the same as the organization_name for the provider.
:nameThe provider name.
:versionThe version of the provider.
:osThe operating system of the provider platform.
:archThe architecture of the provider platform.
StatusResponseReason
200JSON API document (type: "registry-providers")Success
403JSON API error objectForbidden - public provider curation disabled
404JSON API error objectProvider not found or user unauthorized to perform action

Sample Request

curl \
  --request GET \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/vnd.api+json" \
  https://app.terraform.io/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions/3.1.1/platforms/linux/amd64

Sample Response

{
  "data": {
    "id": "provpltfrm-BLJWvWyJ2QMs525k",
    "type": "registry-provider-platforms",
    "attributes": {
      "os": "linux",
      "arch": "amd64",
      "filename": "terraform-provider-aws_3.1.1_linux_amd64.zip",
      "shasum": "8f69533bc8afc227b40d15116358f91505bb638ce5919712fbb38a2dec1bba38",
      "permissions": {
        "can-delete": true,
        "can-upload-asset": true
      },
      "provider-binary-uploaded": true
    },
    "relationships": {
      "registry-provider-version": {
        "data": {
          "id": "provver-y5KZUsSBRLV9zCtL",
          "type": "registry-provider-versions"
        }
      }
    },
    "links": {
      "provider-binary-download": "https://archivist.terraform.io/v1/object/dmF1b..."
    }
  }
}

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

ParameterDescription
:organization_nameThe 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_nameMust be private.
:namespaceThe namespace of the provider for which the platform is being deleted. For private providers this is the same as the :organization_name parameter.
:nameThe name of the provider for which the platform is being deleted.
:versionThe version for which the platform is being deleted.
:osThe operating system of the provider platform that is being deleted.
:archThe architecture of the provider platform that is being deleted.
StatusResponseReason
204NothingSuccess
403JSON API error objectForbidden - public provider curation disabled
404JSON API error objectProvider not found or user not authorized to perform action

Sample Request

curl \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/vnd.api+json" \
  --request DELETE \
  https://app.terraform.io/api/v2/organizations/hashicorp/registry-providers/private/hashicorp/aws/versions/3.1.1/platforms/linux/amd64
Edit this page on GitHub

On this page

  1. Private Provider Versions and Platforms API
  2. Create a Provider Version
  3. Get All Versions for a Single Provider
  4. Get a Version
  5. Delete a Version
  6. Create a Provider Platform
  7. Get All Platforms for a Single Version
  8. Get a Platform
  9. Delete a Platform
Give Feedback(opens in new tab)
  • Certifications
  • System Status
  • Terms of Use
  • Security
  • Privacy
  • Trademark Policy
  • Trade Controls
  • Give Feedback(opens in new tab)