These endpoints are only relevant to private providers. When you publish a private provider to the Terraform Cloud private registry, you must upload the public key of the GPG keypair used to sign the release. Refer to Preparing and Adding a Signing Key for more details.
This endpoint supports pagination with standard URL query parameters. Remember to percent-encode [ as %5B and ] as %5D if your tooling does not automatically encode URLs.
Parameter
Description
filter[namespace]
Required. A comma-separated list of one or more namespaces. The namespaces must be authorized TFC/TFE organization names.
page[number]
Optional. If omitted, the endpoint returns the first page.
page[size]
Optional. If omitted, the endpoint returns 20 GPG keys per page.
Gets a list of GPG keys belonging to the specified namespaces.
{"data":[{"type":"gpg-keys","id":"1","attributes":{"ascii-armor":"-----BEGIN PGP PUBLIC KEY BLOCK-----...","created-at":"2022-02-08T19:15:47Z","key-id":"C4E5E6C66C79C778","namespace":"my-other-organization","source":"","source-url":null,"trust-signature":"","updated-at":"2022-02-08T19:15:47Z"},"links":{"self":"/v2/gpg-keys/1"}},{"type":"gpg-keys","id":"140","attributes":{"ascii-armor":"-----BEGIN PGP PUBLIC KEY BLOCK-----...","created-at":"2022-04-28T21:32:11Z","key-id":"C4E5E6C66C79C778","namespace":"my-organization","source":"","source-url":null,"trust-signature":"","updated-at":"2022-04-28T21:32:11Z"},"links":{"self":"/v2/gpg-keys/140"}}],"links":{"first":"/v2/gpg-keys?filter%5Bnamespace%5D=my-organization%2Cmy-other-organization&page%5Bnumber%5D=1&page%5Bsize%5D=15","last":"/v2/gpg-keys?filter%5Bnamespace%5D=my-organization%2Cmy-other-organization&page%5Bnumber%5D=1&page%5Bsize%5D=15","next":null,"prev":null},"meta":{"pagination":{"page-size":15,"current-page":1,"next-page":null,"prev-page":null,"total-pages":1,"total-count":2}}}
{"data":[{"type":"gpg-keys","id":"1","attributes":{"ascii-armor":"-----BEGIN PGP PUBLIC KEY BLOCK-----...","created-at":"2022-02-08T19:15:47Z","key-id":"C4E5E6C66C79C778","namespace":"my-other-organization","source":"","source-url":null,"trust-signature":"","updated-at":"2022-02-08T19:15:47Z"},"links":{"self":"/v2/gpg-keys/1"}},{"type":"gpg-keys","id":"140","attributes":{"ascii-armor":"-----BEGIN PGP PUBLIC KEY BLOCK-----...","created-at":"2022-04-28T21:32:11Z","key-id":"C4E5E6C66C79C778","namespace":"my-organization","source":"","source-url":null,"trust-signature":"","updated-at":"2022-04-28T21:32:11Z"},"links":{"self":"/v2/gpg-keys/140"}}],"links":{"first":"/v2/gpg-keys?filter%5Bnamespace%5D=my-organization%2Cmy-other-organization&page%5Bnumber%5D=1&page%5Bsize%5D=15","last":"/v2/gpg-keys?filter%5Bnamespace%5D=my-organization%2Cmy-other-organization&page%5Bnumber%5D=1&page%5Bsize%5D=15","next":null,"prev":null},"meta":{"pagination":{"page-size":15,"current-page":1,"next-page":null,"prev-page":null,"total-pages":1,"total-count":2}}}
{"data":{"type":"gpg-keys","attributes":{"namespace":"hashicorp","ascii-armor":"-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINB...=txfz\n-----END PGP PUBLIC KEY BLOCK-----\n"}}}
{"data":{"type":"gpg-keys","attributes":{"namespace":"hashicorp","ascii-armor":"-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINB...=txfz\n-----END PGP PUBLIC KEY BLOCK-----\n"}}}
{"data":{"type":"gpg-keys","id":"23","attributes":{"ascii-armor":"-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINB...=txfz\n-----END PGP PUBLIC KEY BLOCK-----\n","created-at":"2022-02-11T19:16:59Z","key-id":"32966F3FB5AC1129","namespace":"hashicorp","source":"","source-url":null,"trust-signature":"","updated-at":"2022-02-11T19:16:59Z"},"links":{"self":"/v2/gpg-keys/23"}}}
{"data":{"type":"gpg-keys","id":"23","attributes":{"ascii-armor":"-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINB...=txfz\n-----END PGP PUBLIC KEY BLOCK-----\n","created-at":"2022-02-11T19:16:59Z","key-id":"32966F3FB5AC1129","namespace":"hashicorp","source":"","source-url":null,"trust-signature":"","updated-at":"2022-02-11T19:16:59Z"},"links":{"self":"/v2/gpg-keys/23"}}}
"data":{"type":"gpg-keys","id":"2","attributes":{"ascii-armor":"-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINB...=txfz\n-----END PGP PUBLIC KEY BLOCK-----\n","created-at":"2022-02-24T17:07:25Z","key-id":"32966F3FB5AC1129","namespace":"hashicorp","source":"","source-url":null,"trust-signature":"","updated-at":"2022-02-24T17:07:25Z"},"links":{"self":"/v2/gpg-keys/2"}}}
"data":{"type":"gpg-keys","id":"2","attributes":{"ascii-armor":"-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINB...=txfz\n-----END PGP PUBLIC KEY BLOCK-----\n","created-at":"2022-02-24T17:07:25Z","key-id":"32966F3FB5AC1129","namespace":"hashicorp","source":"","source-url":null,"trust-signature":"","updated-at":"2022-02-24T17:07:25Z"},"links":{"self":"/v2/gpg-keys/2"}}}
The namespace of the provider scoped to the GPG key.
:key_id
The id of the GPG key.
Updates the specified GPG key. Only the namespace attribute can be updated, and namespace has to match an organization the user has permission to access.
{"data":{"type":"gpg-keys","id":"2","attributes":{"ascii-armor":"-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINB...=txfz\n-----END PGP PUBLIC KEY BLOCK-----\n","created-at":"2022-02-24T17:07:25Z","key-id":"32966F3FB5AC1129","namespace":"new-name","source":"","source-url":null,"trust-signature":"","updated-at":"2022-02-24T17:12:10Z"},"links":{"self":"/v2/gpg-keys/2"}}}
{"data":{"type":"gpg-keys","id":"2","attributes":{"ascii-armor":"-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINB...=txfz\n-----END PGP PUBLIC KEY BLOCK-----\n","created-at":"2022-02-24T17:07:25Z","key-id":"32966F3FB5AC1129","namespace":"new-name","source":"","source-url":null,"trust-signature":"","updated-at":"2022-02-24T17:12:10Z"},"links":{"self":"/v2/gpg-keys/2"}}}