Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TF-14885 Add default-project relationship to organization API docs #683

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
4 changes: 4 additions & 0 deletions website/docs/cloud-docs/api-docs/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ description: >-

Keep track of changes to the API for HCP Terraform and Terraform Enterprise.

## 2024-07-18
* Add `default-project` relationship to the [`organization` API](/terraform/cloud-docs/api-docs/organizations).
ker-an marked this conversation as resolved.
Show resolved Hide resolved
* Fix `default-agent-pool` data type from attribute to relationship in the [`organization` API](/terraform/cloud-docs/api-docs/organizations) documentation.
ker-an marked this conversation as resolved.
Show resolved Hide resolved

## 2024-07-15
* Update the [Team API](/terraform/cloud-docs/api-docs/teams) to include `allow-member-token-management`.

Expand Down
19 changes: 12 additions & 7 deletions website/docs/cloud-docs/api-docs/organizations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -606,14 +606,15 @@ This PATCH endpoint requires a JSON object with the following properties as a re
| `data.attributes.session-timeout` | integer | 20160 | Session timeout after inactivity (minutes) |
| `data.attributes.session-remember` | integer | 20160 | Session expiration (minutes) |
| `data.attributes.collaborator-auth-policy` | string | password | Authentication policy (`password` or `two_factor_mandatory`) |
| `data.attributes.cost-estimation-enabled` | boolean | false | Whether or not the cost estimation feature is enabled for all workspaces in the organization. Defaults to false. In Terraform Enterprise, you must also enable cost estimation in [Site Administration](/terraform/enterprise/admin/application/integration#cost-estimation-integration). |
| `data.attributes.cost-estimation-enabled` | boolean | `false` | Whether or not the cost estimation feature is enabled for all workspaces in the organization. Defaults to false. In Terraform Enterprise, you must also enable cost estimation in the [site administration settings](/terraform/enterprise/admin/application/integration#cost-estimation-integration). |
| `data.attributes.send-passing-statuses-for-untriggered-speculative-plans` | boolean | false | Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to false. In Terraform Enterprise, this setting is always false and cannot be changed but is also available in Site Administration. |
| `data.attributes.aggregated-commit-status-enabled` | boolean | true | Whether or not to aggregate VCS status updates for triggered workspaces. This is useful for monorepo projects with configuration spanning many workspaces. Defaults to `true`. You cannot use this option if `send-passing-statuses-for-untriggered-speculative-plans` is set to `true`. |
| `data.attributes.owners-team-saml-role-id` | string | (nothing) | **Optional.** **SAML only** The name of the ["owners" team](/terraform/enterprise/saml/team-membership#managing-membership-of-the-owners-team) |
| `data.attributes.assessments-enforced` | boolean | false | Whether or not to compel health assessments for all eligible workspaces. When true, health assessments occur on all compatible workspaces, regardless of the value of the workspace setting `assessments-enabled`. When false, health assessments only occur for workspaces that opt in by setting `assessments-enabled: true`. |
| `data.attributes.allow-force-delete-workspaces` | boolean | false | Whether workspace administrators can [delete workspaces with resources under management](/terraform/cloud-docs/users-teams-organizations/organizations#general). If false, only organization owners may delete these workspaces. |
| `data.attributes.default-execution-mode` | boolean | `remote` | Which [execution mode](/terraform/cloud-docs/workspaces/settings#execution-mode) to use by default. Valid values are `remote`, `local`, and `agent`. |
| `data.attributes.default-agent-pool-id` | string | (previous value) | Required when `default-execution-mode` is set to `agent`. The ID of the agent pool belonging to the organization. Do _not_ specify this value if you set `execution-mode` to `remote` or `local`. |
| `data.attributes.aggregated-commit-status-enabled` | boolean | `true` | Whether or not to aggregate VCS status updates for triggered workspaces. This is useful for monorepo projects with configuration spanning many workspaces. Defaults to `true`. You cannot use this option if `send-passing-statuses-for-untriggered-speculative-plans` is set to `true`. |
| `data.attributes.owners-team-saml-role-id` | string | none | Optional. SAML only. The name of the ["owners" team](/terraform/enterprise/saml/team-membership#managing-membership-of-the-owners-team) |
| `data.attributes.assessments-enforced` | boolean | `false` | Whether or not to compel health assessments for all eligible workspaces. When set to `true`, Terraform performs health assessments on all compatible workspaces, regardless of the value of the workspace setting `assessments-enabled`. When set to `false`, Terraform only performs health assessments for workspaces that opt in by setting `assessments-enabled: true`. |
| `data.attributes.allow-force-delete-workspaces` | boolean | `false` | Whether workspace administrators can delete workspaces with resources under management. Refer to the [general organization settings documentation](/terraform/cloud-docs/users-teams-organizations/organizations#general) for additional information. When set to `false, only organization owners may delete these workspaces. |
| `data.attributes.default-execution-mode` | boolean | `remote` | Which [execution mode](/terraform/cloud-docs/workspaces/settings#execution-mode) to use by default. Valid values are `remote`, `local`, and `agent`. |
ker-an marked this conversation as resolved.
Show resolved Hide resolved
| `data.relationships.default-agent-pool.data.id` | string | | Required when `default-execution-mode` is set to `agent`. The ID of the agent pool belonging to the organization. Do _not_ specify this value if you set `execution-mode` to `remote` or `local`. |
| `data.relationships.default-project.data.id` | string | | Specifies the ID of the default project. If left blank, Terraform removes the organization's default project. You must have [owner permissions](/terraform/cloud-docs/users-teams-organizations/permissions#organization-owners) to update the default project. |
ker-an marked this conversation as resolved.
Show resolved Hide resolved

### Sample Payload

Expand Down Expand Up @@ -699,6 +700,10 @@ curl \
"default-agent-pool": {
"data": null
},
"default-project": {
"data": "prj-ckZoJwdERaWcFHwi",
"type": "projects"
},
ker-an marked this conversation as resolved.
Show resolved Hide resolved
"oauth-tokens": {
"links": {
"related": "/api/v2/organizations/hashicorp/oauth-tokens"
Expand Down