Skip to content

Commit

Permalink
Add guide - How to associate policy pack to specific resource. Closes #…
Browse files Browse the repository at this point in the history
…232 (#240)

Co-authored-by: Raj <[email protected]>
  • Loading branch information
RahulSrivastav14 and rajlearner17 authored Jan 14, 2025
1 parent a59b7b8 commit 59a904e
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 5 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
title: Attach Policy Pack to Resource
sidebar_label: Attach Policy Pack to Resource
---

# Attach Policy Pack to Specific Resource

In this guide, you will:
- Use the Guardrails console to associate policy packs to a specific resource.

[Policy Packs](/guardrails/docs/guides/configuring-guardrails/policy-packs#policy-packs) let administrators group and apply policies to specific resources, like AWS accounts, folders, or individual resources. Associating Policy Packs with resources ensures consistent policy enforcement and simplifies management across your environment.

## Prerequisites

- **Turbot/Operator** permissions at the Turbot resource level.
- Familiarity with Guardrails console.

## Step 1: Login to Guardrails Console

Log into the Guardrails console.

![Guardrails Console Login](/images/docs/guardrails/guides/configuring-guardrails/policy-packs/attach-policy-pack-to-resource/guardrails-console-login.png)

## Step 2: Navigate to Resources

Choose **Resources** from the top navigation menu.

![Navigate to Resources](/images/docs/guardrails/guides/configuring-guardrails/policy-packs/attach-policy-pack-to-resource/guardrails-select-resources-tab.png)

## Step 3: Select Resource

Search for and select the desired resource. In this example, we have selected an EC2 Volume.

![Select EBS Volume](/images/docs/guardrails/guides/configuring-guardrails/policy-packs/attach-policy-pack-to-resource/guardrails-select-resource.png)

## Step 4: Associate Policy Pack

From the resource detail page, click **MANAGE** in the Policy Packs section to proceed.

![Select Manage](/images/docs/guardrails/guides/configuring-guardrails/policy-packs/attach-policy-pack-to-resource/guardrails-select-manage.png)

Select **Add** from the dialog box.

![Select Add](/images/docs/guardrails/guides/configuring-guardrails/policy-packs/attach-policy-pack-to-resource/guardrails-select-add.png)

Select the desired policy pack and click **Save** to apply it to the resource.

![Save Policy Pack](/images/docs/guardrails/guides/configuring-guardrails/policy-packs/attach-policy-pack-to-resource/guardrails-select-policy-pack-save.png)

## Step 5: Verify Control

The newly attached policy pack should now be visible under the **Policies** tab of the resource.

![Review Policy](/images/docs/guardrails/guides/configuring-guardrails/policy-packs/attach-policy-pack-to-resource/guardrails-verify-policy.png)

The newly applied control should now be visible under the **Controls** tab of the resource.

![Review Policy](/images/docs/guardrails/guides/configuring-guardrails/policy-packs/attach-policy-pack-to-resource/guardrails-verify-controls.png)

## Next Steps

Explore the following resources to learn more about Guardrails’ Policies feature:

- Learn about [Policy Packs](/guardrails/docs/concepts/policy-packs)
- Learn about [Managing Policies](/guardrails/docs/guides/configuring-guardrails/managing-policies)

## Troubleshooting

| Issue | Description | Guide |
|----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|
| Further Assistance | If you continue to encounter issues, please open a ticket with us and attach the relevant information to assist you more efficiently. | [Open Support Ticket](https://support.turbot.com) |
4 changes: 4 additions & 0 deletions docs/guides/configuring-guardrails/policy-packs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ sidebar_label: Policy Packs
[Policy packs](concepts/resources/policy-packs) (previously named Smart Folders) enable administrators to apply one or more policies across multiple accounts and/or resources, thus automating what would otherwise be a time-consuming manual process. You create, delete, and rename a Policy Pack just like a regular Guardrails folder, then *attach* it to the Guardrails hierarchy. The policies it defines govern all resources below that point in the hierarchy.

## Create a Policy Pack

1. Click on the "Policies" link in the top menu bar.
1. Select the large grey "Policy Packs" button.
1. Click on the green "New Policy Pack" button on the right side of the page
1. Give the pack a name, description and a unique aka (if desired).
1. Finish by clicking the green "Create" button


![](/images/docs/guardrails/policies-page.png)

**Tip**: It is most useful to create Policy Packs (and other Guardrails configuration) as code. See [below](#create-a-policy-pack-as-code) for details.
Expand All @@ -24,6 +26,8 @@ sidebar_label: Policy Packs
2. When you get there, click on the **Detail** tab.
3. In the Policy Pack module on the right, click **Manage**.
4. Click "Add" then select your policy pack.
> [!NOTE]
> See detailed guide [here](/guides/configuring-guardrails/policy-packs/attach-policy-pack-to-resource).
## Detach a Policy Pack from a Resource

Expand Down
16 changes: 11 additions & 5 deletions docs/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,7 @@
"type": "category",
"id": "event-handlers",
"link": "guides/aws/event-handlers",
"items": [
"guides/aws/event-handlers/poller"
]
"items": ["guides/aws/event-handlers/poller"]
},
{
"type": "category",
Expand Down Expand Up @@ -343,7 +341,15 @@
]
},
"guides/configuring-guardrails/network-stack",
"guides/configuring-guardrails/policy-packs",
{
"type": "category",
"id": "policy-packs",
"link": "guides/configuring-guardrails/policy-packs",
"items": [
"guides/configuring-guardrails/policy-packs/attach-policy-pack-to-resource"
]
},

"guides/configuring-guardrails/regions",
{
"type": "category",
Expand Down Expand Up @@ -517,7 +523,7 @@
}
]
},
"guides/troubleshooting"
"guides/troubleshooting"
]
},
{
Expand Down

0 comments on commit 59a904e

Please sign in to comment.