Skip to content

Commit

Permalink
Merge pull request #70 from hashicorp/jarrodn-au/remove-managed-polic…
Browse files Browse the repository at this point in the history
…y-decprecation-warnings

Remove references to Managed Policies being a deprecated feature
  • Loading branch information
jarrodn-au authored Jul 14, 2022
2 parents e56d1e4 + 16189fe commit b529081
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ vendor/

# Coverage
coverage.txt

.vscode/
10 changes: 5 additions & 5 deletions website/docs/cloud-docs/api-docs/policy-sets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Properties without a default value are required.
| `data.attributes.vcs-repo.ingress-submodules` | boolean | `false` | Determines whether repository submodules will be instantiated during the clone operation. |
| `data.attributes.policies-path` | string | `null` | The subdirectory of the attached VCS repository that contains the policies for this policy set. Files and directories outside of this sub-path will be ignored, and changes to those unrelated files won't cause the policy set to be updated. This option may only be specified when a VCS repo is present. |
| `data.relationships.workspaces.data[]` | array\[object] | `[]` | A list of resource identifier objects that defines which workspaces the new set will be attached to. These objects must contain `id` and `type` properties, and the `type` property must be `workspaces` (e.g. `{ "id": "ws-2HRvNs49EWPjDqT1", "type": "workspaces" }`). Obtain workspace IDs from the [workspace settings](/cloud-docs/workspaces/settings) or the [Show Workspace](/cloud-docs/api-docs/workspaces#show-workspace) endpoint. Individual workspaces cannot be attached to the policy set when `data.attributes.global` is `true`. |
| `data.relationships.policies.data[]` | array\[object] | `[]` | **DEPRECATED.** A list of resource identifier objects that defines which policies will be members of the new set. These objects must contain `id` and `type` properties, and the `type` property must be `policies` (e.g. `{ "id": "pol-u3S5p2Uwk21keu1s", "type": "policies" }`). **Important:** This deprecated option will be removed in the future in favor of VCS policy sets. |
| `data.relationships.policies.data[]` | array\[object] | `[]` | A list of resource identifier objects that defines which policies will be members of the new set. These objects must contain `id` and `type` properties, and the `type` property must be `policies` (e.g. `{ "id": "pol-u3S5p2Uwk21keu1s", "type": "policies" }`). |

### Sample Payload

Expand Down Expand Up @@ -114,7 +114,7 @@ Properties without a default value are required.
}
```

### Sample payload with individual policy relationships (deprecated)
### Sample payload with individual policy relationships

```json
{
Expand Down Expand Up @@ -192,7 +192,7 @@ curl \
}
```

### Sample response with individual policy relationships (deprecated)
### Sample response with individual policy relationships

```json
{
Expand Down Expand Up @@ -306,7 +306,7 @@ curl \
}
```

### Sample response with individual policy relationships (deprecated)
### Sample response with individual policy relationships

```json
{
Expand Down Expand Up @@ -453,7 +453,7 @@ curl --request GET \
}
```

### Sample response with individual policy relationships (deprecated)
### Sample response with individual policy relationships

```json
{
Expand Down
4 changes: 2 additions & 2 deletions website/docs/cloud-docs/sentinel/manage-policies.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ To manage policy sets, go to the "Policy Sets" section on the organization setti

![policy-sets-navigate](/img/docs/policy-sets-navigate.png)

Policy sets enforced on all workspaces are marked "All workspaces" in this list; other policy sets show how many workspaces they are enforced on. You may also notice policy sets with an informational tag that reads "Policies managed individually", which indicates that the policy set is not versioned and uses policy relationships (deprecated). These policy sets will need to be [migrated](#migrating-individually-managed-policies-to-versioned-policy-sets) in the future.
Policy sets enforced on all workspaces are marked "All workspaces" in this list; other policy sets show how many workspaces they are enforced on. You may also notice policy sets with an informational tag that reads "Policies managed individually", which indicates that the policy set is not versioned and uses policy relationships. These policy sets may be [migrated](#migrating-individually-managed-policies-to-versioned-policy-sets) in the future, if required.

To create a new policy set, click the "Create a new policy set" button; to edit an existing set, click its entry in the list. Click the "Create policy set" or "Update policy set" button when finished.

Expand All @@ -201,7 +201,7 @@ When creating or editing a policy set, the following fields are available:

## Migrating individually managed policies to versioned policy sets

Individually managed policies were a proof-of-concept feature in Terraform Cloud which allowed editing policy code directly in the UI and combining these policies into policy sets. This workflow is deprecated and is being replaced by versioned policy sets, which are managed as an immutable, atomic, and versioned unit, using VCS or directly uploading entire policy sets through the API.
Individually managed policies allows for editing policy code directly in the UI and combining these policies into policy sets. This workflow is a good entry into policy as code, and when you are ready to scale beyond individually managed policies, we recommend versioned policy sets, which are managed as an immutable, atomic, and versioned unit, using VCS or directly uploading entire policy sets through the API.

If you already have policy sets defined which reference individually managed policies directly, you can quickly and easily migrate them to versioned policy sets.

Expand Down

1 comment on commit b529081

@vercel
Copy link

@vercel vercel bot commented on b529081 Jul 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.