From b41c2e7ad84bde9e62ce8b50dc521a39bd161abb Mon Sep 17 00:00:00 2001 From: Keran Braich Date: Thu, 18 Jul 2024 09:06:39 -0700 Subject: [PATCH 01/14] Add default-project relationship to organization API docs --- .../cloud-docs/api-docs/organizations.mdx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/website/docs/cloud-docs/api-docs/organizations.mdx b/website/docs/cloud-docs/api-docs/organizations.mdx index 4387d35bc..710317506 100644 --- a/website/docs/cloud-docs/api-docs/organizations.mdx +++ b/website/docs/cloud-docs/api-docs/organizations.mdx @@ -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 [Site Administration](/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 | (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.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 | | The ID of the default project. If left blank, the organization will have its default project removed. You must have [owner permissions](/terraform/cloud-docs/users-teams-organizations/permissions#organization-owners) to update the default project. | ### Sample Payload @@ -699,6 +700,10 @@ curl \ "default-agent-pool": { "data": null }, + "default-project": { + "data": "prj-ckZoJwdERaWcFHwi", + "type": "projects" + }, "oauth-tokens": { "links": { "related": "/api/v2/organizations/hashicorp/oauth-tokens" From 65077f830da8df1c499a1d125b2594366ab1699e Mon Sep 17 00:00:00 2001 From: Keran Braich Date: Thu, 18 Jul 2024 09:30:21 -0700 Subject: [PATCH 02/14] Update API changelog --- website/docs/cloud-docs/api-docs/changelog.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/docs/cloud-docs/api-docs/changelog.mdx b/website/docs/cloud-docs/api-docs/changelog.mdx index 81b8ba852..495bd57c1 100644 --- a/website/docs/cloud-docs/api-docs/changelog.mdx +++ b/website/docs/cloud-docs/api-docs/changelog.mdx @@ -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). +* Fix `default-agent-pool` data type from attribute to relationship in the [`organization` API](/terraform/cloud-docs/api-docs/organizations) documentation. + ## 2024-07-15 * Update the [Team API](/terraform/cloud-docs/api-docs/teams) to include `allow-member-token-management`. From cc7368c2e2f7fa215577bdbd3667d96951c146fa Mon Sep 17 00:00:00 2001 From: Keran Braich Date: Thu, 18 Jul 2024 10:25:10 -0700 Subject: [PATCH 03/14] Update cost-estimation-enabled text Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> --- website/docs/cloud-docs/api-docs/organizations.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/cloud-docs/api-docs/organizations.mdx b/website/docs/cloud-docs/api-docs/organizations.mdx index 710317506..a44363034 100644 --- a/website/docs/cloud-docs/api-docs/organizations.mdx +++ b/website/docs/cloud-docs/api-docs/organizations.mdx @@ -606,7 +606,7 @@ 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) | From 7f963f3c2b330da3dea4b5a6bd7e5b373b423ba0 Mon Sep 17 00:00:00 2001 From: Keran Braich Date: Thu, 18 Jul 2024 10:25:28 -0700 Subject: [PATCH 04/14] Update aggregated-commit-status-enabled text Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> --- website/docs/cloud-docs/api-docs/organizations.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/cloud-docs/api-docs/organizations.mdx b/website/docs/cloud-docs/api-docs/organizations.mdx index a44363034..fbd319b48 100644 --- a/website/docs/cloud-docs/api-docs/organizations.mdx +++ b/website/docs/cloud-docs/api-docs/organizations.mdx @@ -608,7 +608,7 @@ This PATCH endpoint requires a JSON object with the following properties as a re | `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 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.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. | From 7eb07297900ee3e583187cf9ca9f14e48c2088fb Mon Sep 17 00:00:00 2001 From: Keran Braich Date: Thu, 18 Jul 2024 10:25:49 -0700 Subject: [PATCH 05/14] Update owners-team-saml-role-id text Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> --- website/docs/cloud-docs/api-docs/organizations.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/cloud-docs/api-docs/organizations.mdx b/website/docs/cloud-docs/api-docs/organizations.mdx index fbd319b48..0705c5d37 100644 --- a/website/docs/cloud-docs/api-docs/organizations.mdx +++ b/website/docs/cloud-docs/api-docs/organizations.mdx @@ -609,7 +609,7 @@ This PATCH endpoint requires a JSON object with the following properties as a re | `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.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 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`. | From 7852ce71669a27fb98ccba5400a3a7d905bce4d0 Mon Sep 17 00:00:00 2001 From: Keran Braich Date: Thu, 18 Jul 2024 10:26:02 -0700 Subject: [PATCH 06/14] Update assessments-enforced text Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> --- website/docs/cloud-docs/api-docs/organizations.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/cloud-docs/api-docs/organizations.mdx b/website/docs/cloud-docs/api-docs/organizations.mdx index 0705c5d37..bbeabac3f 100644 --- a/website/docs/cloud-docs/api-docs/organizations.mdx +++ b/website/docs/cloud-docs/api-docs/organizations.mdx @@ -610,7 +610,7 @@ This PATCH endpoint requires a JSON object with the following properties as a re | `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 | 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 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.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](/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.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`. | From d2b7b4d217f89ba69c24b8fc8e66957e698abb7a Mon Sep 17 00:00:00 2001 From: Keran Braich Date: Thu, 18 Jul 2024 10:26:18 -0700 Subject: [PATCH 07/14] Update allow-force-delete-workspaces text Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> --- website/docs/cloud-docs/api-docs/organizations.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/cloud-docs/api-docs/organizations.mdx b/website/docs/cloud-docs/api-docs/organizations.mdx index bbeabac3f..dd187c667 100644 --- a/website/docs/cloud-docs/api-docs/organizations.mdx +++ b/website/docs/cloud-docs/api-docs/organizations.mdx @@ -611,7 +611,7 @@ This PATCH endpoint requires a JSON object with the following properties as a re | `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](/terraform/cloud-docs/users-teams-organizations/organizations#general). If false, only organization owners may delete these workspaces. | +| `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`. | | `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 | | The ID of the default project. If left blank, the organization will have its default project removed. You must have [owner permissions](/terraform/cloud-docs/users-teams-organizations/permissions#organization-owners) to update the default project. | From c7f5ca3d82836bc21672c5728482a8187a75f964 Mon Sep 17 00:00:00 2001 From: Keran Braich Date: Thu, 18 Jul 2024 10:26:28 -0700 Subject: [PATCH 08/14] Update default-project text Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> --- website/docs/cloud-docs/api-docs/organizations.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/cloud-docs/api-docs/organizations.mdx b/website/docs/cloud-docs/api-docs/organizations.mdx index dd187c667..8b695c896 100644 --- a/website/docs/cloud-docs/api-docs/organizations.mdx +++ b/website/docs/cloud-docs/api-docs/organizations.mdx @@ -614,7 +614,7 @@ This PATCH endpoint requires a JSON object with the following properties as a re | `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`. | | `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 | | The ID of the default project. If left blank, the organization will have its default project removed. You must have [owner permissions](/terraform/cloud-docs/users-teams-organizations/permissions#organization-owners) to update the default project. | +| `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. | ### Sample Payload From 05177d4fa48b13cd290da5b93a4a68312f74f073 Mon Sep 17 00:00:00 2001 From: Keran Braich Date: Thu, 18 Jul 2024 14:14:11 -0700 Subject: [PATCH 09/14] Update changelog Co-authored-by: Jeff Bonhag --- website/docs/cloud-docs/api-docs/changelog.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/cloud-docs/api-docs/changelog.mdx b/website/docs/cloud-docs/api-docs/changelog.mdx index 495bd57c1..33dac48e2 100644 --- a/website/docs/cloud-docs/api-docs/changelog.mdx +++ b/website/docs/cloud-docs/api-docs/changelog.mdx @@ -10,7 +10,7 @@ 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). +* Add `default-project` relationship to the [Organizations API](/terraform/cloud-docs/api-docs/organizations). * Fix `default-agent-pool` data type from attribute to relationship in the [`organization` API](/terraform/cloud-docs/api-docs/organizations) documentation. ## 2024-07-15 From 54181847de9a8ee407832d10fe6fccdeae5027e2 Mon Sep 17 00:00:00 2001 From: Keran Braich Date: Thu, 18 Jul 2024 14:14:54 -0700 Subject: [PATCH 10/14] Update default-execution-mode value type Co-authored-by: Jeff Bonhag --- website/docs/cloud-docs/api-docs/organizations.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/cloud-docs/api-docs/organizations.mdx b/website/docs/cloud-docs/api-docs/organizations.mdx index 8b695c896..36ec89cda 100644 --- a/website/docs/cloud-docs/api-docs/organizations.mdx +++ b/website/docs/cloud-docs/api-docs/organizations.mdx @@ -612,7 +612,7 @@ This PATCH endpoint requires a JSON object with the following properties as a re | `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`. | +| `data.attributes.default-execution-mode` | string | `remote` | Which [execution mode](/terraform/cloud-docs/workspaces/settings#execution-mode) to use by default. Valid values are `remote`, `local`, and `agent`. | | `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. | From 5c77e19bdb893d1d88855359672577962cde501a Mon Sep 17 00:00:00 2001 From: Keran Braich Date: Thu, 18 Jul 2024 14:15:51 -0700 Subject: [PATCH 11/14] Remove line from changelog that isn't needed --- website/docs/cloud-docs/api-docs/changelog.mdx | 1 - 1 file changed, 1 deletion(-) diff --git a/website/docs/cloud-docs/api-docs/changelog.mdx b/website/docs/cloud-docs/api-docs/changelog.mdx index 33dac48e2..4f5adc2bd 100644 --- a/website/docs/cloud-docs/api-docs/changelog.mdx +++ b/website/docs/cloud-docs/api-docs/changelog.mdx @@ -11,7 +11,6 @@ Keep track of changes to the API for HCP Terraform and Terraform Enterprise. ## 2024-07-18 * Add `default-project` relationship to the [Organizations API](/terraform/cloud-docs/api-docs/organizations). -* Fix `default-agent-pool` data type from attribute to relationship in the [`organization` API](/terraform/cloud-docs/api-docs/organizations) documentation. ## 2024-07-15 * Update the [Team API](/terraform/cloud-docs/api-docs/teams) to include `allow-member-token-management`. From 6bc8e670b30ae10961eeb2294b01de5679cef083 Mon Sep 17 00:00:00 2001 From: Keran Braich Date: Fri, 19 Jul 2024 12:53:25 -0700 Subject: [PATCH 12/14] Update API response Co-authored-by: Jeff Bonhag --- website/docs/cloud-docs/api-docs/organizations.mdx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/website/docs/cloud-docs/api-docs/organizations.mdx b/website/docs/cloud-docs/api-docs/organizations.mdx index 36ec89cda..826f2d300 100644 --- a/website/docs/cloud-docs/api-docs/organizations.mdx +++ b/website/docs/cloud-docs/api-docs/organizations.mdx @@ -701,9 +701,11 @@ curl \ "data": null }, "default-project": { - "data": "prj-ckZoJwdERaWcFHwi", - "type": "projects" - }, + "data": { + "type": "projects", + "id": "prj-1FzpQt4EyQDEqjCU" + } + } "oauth-tokens": { "links": { "related": "/api/v2/organizations/hashicorp/oauth-tokens" From 8800e1bd4b9bc12889fac485324649a2479af75d Mon Sep 17 00:00:00 2001 From: Keran Braich Date: Fri, 19 Jul 2024 13:01:05 -0700 Subject: [PATCH 13/14] Update default-project description --- .../cloud-docs/api-docs/organizations.mdx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/docs/cloud-docs/api-docs/organizations.mdx b/website/docs/cloud-docs/api-docs/organizations.mdx index 826f2d300..59bf7b8f2 100644 --- a/website/docs/cloud-docs/api-docs/organizations.mdx +++ b/website/docs/cloud-docs/api-docs/organizations.mdx @@ -598,23 +598,23 @@ curl \ This PATCH endpoint requires a JSON object with the following properties as a request payload. -| Key path | Type | Default | Description | -| ------------------------------------------------------------------------- | ------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data.type` | string | | Must be `"organizations"` | -| `data.attributes.name` | string | | Name of the organization | -| `data.attributes.email` | string | | Admin email address | -| `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 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 | 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` | string | `remote` | Which [execution mode](/terraform/cloud-docs/workspaces/settings#execution-mode) to use by default. Valid values are `remote`, `local`, and `agent`. | -| `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. | +| Key path | Type | Default | Description | +| ------------------------------------------------------------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data.type` | string | | Must be `"organizations"` | +| `data.attributes.name` | string | | Name of the organization | +| `data.attributes.email` | string | | Admin email address | +| `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 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 | 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` | string | `remote` | Which [execution mode](/terraform/cloud-docs/workspaces/settings#execution-mode) to use by default. Valid values are `remote`, `local`, and `agent`. | +| `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 set to `null`, Terraform removes the organization's default project. If omitted, Terraform doesn't change the organization's default project. You must have [owner permissions](/terraform/cloud-docs/users-teams-organizations/permissions#organization-owners) to update the default project. | ### Sample Payload From 946d181e495b05412b302a35c27698e58dd8e2e4 Mon Sep 17 00:00:00 2001 From: Keran Braich Date: Mon, 22 Jul 2024 15:47:23 -0700 Subject: [PATCH 14/14] Remove line about what happens if relationship ID is omitted --- website/docs/cloud-docs/api-docs/organizations.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/cloud-docs/api-docs/organizations.mdx b/website/docs/cloud-docs/api-docs/organizations.mdx index 59bf7b8f2..3383f6344 100644 --- a/website/docs/cloud-docs/api-docs/organizations.mdx +++ b/website/docs/cloud-docs/api-docs/organizations.mdx @@ -614,7 +614,7 @@ This PATCH endpoint requires a JSON object with the following properties as a re | `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` | string | `remote` | Which [execution mode](/terraform/cloud-docs/workspaces/settings#execution-mode) to use by default. Valid values are `remote`, `local`, and `agent`. | | `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 set to `null`, Terraform removes the organization's default project. If omitted, Terraform doesn't change the organization's default project. You must have [owner permissions](/terraform/cloud-docs/users-teams-organizations/permissions#organization-owners) to update the default project. | +| `data.relationships.default-project.data.id` | string | | Specifies the ID of the default project. If set to `null`, 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. | ### Sample Payload