Terraform Enterprise Only: The admin API is exclusive to Terraform Enterprise, and can only be used by the admins and operators who install and maintain their organization's Terraform Enterprise instance.
The Organizations Admin API contains endpoints to help site administrators manage organizations.
This endpoint supports pagination with standard URL query parameters. Remember to percent-encode [ as %5B and ] as %5D if your tooling doesn't automatically encode URLs.
Parameter
Description
q
Optional. A search query string. Organizations are searchable by name and notification email. This takes precedence over the attribute specific searches q[email] or q[name].
q[email]
Optional. A search query string. This will search organizations by notification email. If used with q[name], it will return organizations that match both queries.
q[name]
Optional. A search query string. This will search organizations by name. If used with q[email], it will return organizations that match both queries.
filter[module_producer]
Optional. Allows filtering organizations based on their module sharing configuration. Accepts a boolean true/false value. A true value returns organizations that are configured to share their modules, and a false value returns organizations that are not configured to share their modules.
page[number]
Optional. If omitted, the endpoint will return the first page.
page[size]
Optional. If omitted, the endpoint will return 20 organizations per page.
This PATCH endpoint requires a JSON object with the following properties as a request payload. Note that the Admin Organizations API may offer a different set of attributes than the Organizations API.
Key path
Type
Default
Description
data.type
string
Must be "organizations"
data.attributes.access-beta-tools
boolean
false
Whether or not workspaces in the organization can be configured to use beta Terraform versions.
data.attributes.global-module-sharing
boolean
false
If true, modules in the organization's private module repository will be available to all other organizations in this TFE instance. Enabling this will disable any previously configured module consumers.
data.attributes.is-disabled
boolean
false
Removes all permissions from the organization and makes it inaccessible to users.
Maximum run time for Terraform applies for this organization. Will use the configured global defaults if left unset. Specify a duration with a decimal number and a unit suffix.
Maximum run time for Terraform plans for this organization. Will use the configured global defaults if left unset. Specify a duration with a decimal number and a unit suffix.
data.attributes.workspace-limit
integer
Maximum number of workspaces for this organization. If this number is set to a value lower than the number of workspaces the organization has, it will prevent additional workspaces from being created, but existing workspaces will not be affected. If set to 0, this limit will have no effect.
This API endpoint is available in Terraform Enterprise as of version 202103-1.
GET /api/v2/admin/organizations/:name/relationships/module-consumers
This endpoint lists specific organizations in the Terraform Enterprise installation that have permission to use an organization's modules. It will be empty if the organization is sharing modules using global module sharing, or if the organization has no module sharing configuration.
Parameter
Description
:name
The name of the organization whose module consumers should be listed
This endpoint supports pagination with standard URL query parameters. Remember to percent-encode [ as %5B and ] as %5D if your tooling doesn't automatically encode URLs.
Parameter
Description
page[number]
Optional. If omitted, the endpoint will return the first page.
page[size]
Optional. If omitted, the endpoint will return 20 organizations per page.
This endpoint is used to specify a list of organizations that can use modules from the sharing organization's private registry. Setting a list of module consumers will turn off global module sharing for an organization.
Parameter
Description
:name
The name of the organization whose registry is being shared
This PATCH endpoint requires a JSON object with the following properties as a request payload.
Key path
Type
Default
Description
data[]
array[object]
A list of resource identifier objects that defines which organizations will consume modules. These objects must contain id and type properties, and the type property must be organizations (e.g. { "id": "an-org", "type": "organizations" }).