June 20-22 Announcing HashiConf Europe full schedule: keynotes, sessions, labs & more Register Now
  • Overview
    • Enforce Policy as Code
    • Infrastructure as Code
    • Inject Secrets into Terraform
    • Integrate with Existing Workflows
    • Manage Kubernetes
    • Manage Network Infrastructure
    • Manage Virtual Machine Images
    • Multi-Cloud Deployment
    • Terraform CLI
    • Terraform Cloud
    • Terraform Enterprise
  • Registry
  • Tutorials
    • About the Docs
    • Intro to Terraform
    • Configuration Language
    • Terraform CLI
    • Terraform Cloud
    • Terraform Enterprise
    • Provider Use
    • Plugin Development
    • Registry Publishing
    • Integration Program
    • Terraform Tools
    • CDK for Terraform
    • Glossary
  • Community
GitHubTerraform Cloud
Download

    Terraform Cloud and Enterprise

  • Overview
  • Plans and Features
  • Getting Started
    • API Docs template
    • Overview
    • Account
    • Agent Pools
    • Agent Tokens
    • Applies
    • Audit Trails
    • 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
    • Runs
    • Run Tasks
    • Run Tasks Integration
    • Run Triggers
    • SSH Keys
    • State Versions
    • State Version Outputs
    • Subscriptions
    • Team Access
    • Team Membership
    • Team Tokens
    • Teams
    • User Tokens
    • Users
    • Variables
    • VCS Events
    • Workspaces
    • Workspace-Specific Variables
    • Workspace Resources
    • Variable Sets
      • Overview
      • Module Sharing
      • Organizations
      • Runs
      • Settings
      • Terraform Versions
      • Users
      • Workspaces
    • Changelog
    • Stability Policy
    • Overview
    • Creating Workspaces
    • Naming
    • Terraform Configurations
      • Overview
      • Managing Variables
      • Overview
      • VCS Connections
      • Access
      • Notifications
      • SSH Keys for Modules
      • Run Triggers
      • Run Tasks
    • Terraform State
    • JSON Filtering
    • Remote Operations
    • Viewing and Managing Runs
    • Run States and Stages
    • Run Modes and Options
    • UI/VCS-driven Runs
    • API-driven Runs
    • CLI-driven Runs
    • The Run Environment
    • Installing Software
    • Users
    • Teams
    • Organizations
    • Permissions
    • Two-factor Authentication
    • API Tokens
      • Overview
      • Microsoft Azure AD
      • Okta
      • SAML
      • Linking a User Account
      • Testing
    • Overview
    • GitHub.com
    • GitHub.com (OAuth)
    • GitHub Enterprise
    • GitLab.com
    • GitLab EE and CE
    • Bitbucket Cloud
    • Bitbucket Server and Data Center
    • Azure DevOps Services
    • Azure DevOps Server
    • Troubleshooting
    • Overview
    • Adding Public Providers and Modules
    • Publishing Private Providers
    • Publishing Private Modules
    • Using Providers and Modules
    • Configuration Designer
  • Migrating to Terraform Cloud
    • Overview
    • Using Sentinel with Terraform 0.12
    • Manage Policies
    • Enforce and Override Policies
    • Mocking Terraform Sentinel Data
    • Working With JSON Result Data
      • Overview
      • tfconfig
      • tfconfig/v2
      • tfplan
      • tfplan/v2
      • tfstate
      • tfstate/v2
      • tfrun
    • Example Policies
    • Overview
    • AWS
    • GCP
    • Azure
      • Overview
      • Service Catalog
      • Admin Guide
      • Developer Reference
      • Example Customizations
      • V1 Setup Instructions
    • Splunk Integration
    • Kubernetes Integration
    • Run Tasks Integration
    • Overview
    • IP Ranges
    • Data Security
    • Security Model
    • Overview
    • Part 1: Overview of Our Recommended Workflow
    • Part 2: Evaluating Your Current Provisioning Practices
    • Part 3: How to Evolve Your Provisioning Practices
    • Part 3.1: From Manual Changes to Semi-Automation
    • Part 3.2: From Semi-Automation to Infrastructure as Code
    • Part 3.3: From Infrastructure as Code to Collaborative Infrastructure as Code
    • Part 3.4: Advanced Workflow Improvements

  • Terraform Cloud Agents

  • Terraform Enterprise Admin

  • Other Docs

  • Intro to Terraform
  • Configuration Language
  • Terraform CLI
  • Terraform Cloud
  • Terraform Enterprise
  • Provider Use
  • Plugin Development
  • Registry Publishing
  • Integration Program
  • Terraform Tools
  • CDK for Terraform
  • Glossary
Type '/' to Search

»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"]
    }
  }
}
{
  "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
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..."
    }
  }
}

{
  "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
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
    }
  }
}
{
  "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
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..."
    }
  }
}
{
  "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
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"
    }
  }
}
{
  "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
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..."
    }
  }
}

{
  "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
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
    }
  }
}
{
  "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
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..."
    }
  }
}
{
  "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
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
github logoEdit this page
  • Overview
  • Docs
  • Extend
  • Privacy
  • Security
  • Press Kit
  • Consent Manager