---
title: How to Attach a Policy to a Group
url: https://docs.vultr.com/platform/iam/policies/how-to-attach-a-policy-to-a-group
description: Attach an IAM policy to a group on Vultr. Grant all members of the group the permissions defined in the policy document through the Vultr API or Console.
publish_date: 2026-03-24T19:52:05.421809Z
last_updated: 2026-06-01T21:19:22.977826Z
---

Attaching a policy to a group grants all members of the group the permissions defined in the policy's document. This simplifies access management by allowing you to control permissions at the group level rather than attaching policies to individual users.

Follow this guide to attach a policy to a group using the Vultr Console, the Vultr API, or Terraform.

=== "Vultr Console"

    1. Log in to the [Vultr Console](https://console.vultr.com).
    1. Click the organization name in the top navigation bar.
    1. Click **Manage Organization**.
    1. Click the **Permission Policies** tab.
    1. Click the name of the policy you want to attach.
    1. In the **Attached Entities** section, click the **+** button.
    1. Search for and select the groups you want to attach to this policy.
    1. Click **Attach Entities**.

        The selected groups appear in the Attached Entities list and all group members inherit the policy's permissions.

=== "Vultr API"

    1. Send a `GET` request to the [**List Policies** endpoint](https://www.vultr.com/api/#tag/iam/operation/list-iam-policies) to retrieve all policies in your organization.

        ```console
        $ curl "https://api.vultr.com/v2/policies" \
            -X GET \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

        Note the `id` of the policy you want to attach.

    1. Send a `GET` request to the [**List Groups** endpoint](https://www.vultr.com/api/#tag/iam/operation/list-iam-groups) to retrieve all groups.

        ```console
        $ curl "https://api.vultr.com/v2/groups" \
            -X GET \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

        Note the `id` of the group to which you want to attach the policy.

    1. Send a `POST` request to the [**Attach Policy to Group** endpoint](https://www.vultr.com/api/#tag/iam/operation/attach-iam-group-to-policy) to attach the policy. Replace `{policy-id}` with the policy id and `{group-id}` with the group id.

        ```console
        $ curl "https://api.vultr.com/v2/policies/{policy-id}/groups/{group-id}" \
            -X POST \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

        A successful request returns an HTTP `201 Created` response.

=== "Terraform"

    1. Ensure the [Vultr Terraform provider](https://registry.terraform.io/providers/vultr/vultr/latest/docs) is configured in your Terraform project.

    1. Define the policy-group attachment resource. Use Terraform references if the policy and group are managed in the same configuration, or replace with literal IDs.

        ```hcl
        resource "vultr_organization_policy_group_attachment" "policy-group-attachment" {
          policy_id = vultr_organization_policy.my_policy.id
          group_id  = vultr_organization_group.my_group.id
        }
        ```

    1. Apply the configuration.

        ```console
        $ terraform apply
        ```

        Verify that the output shows `vultr_organization_policy_group_attachment.policy-group-attachment: Creation complete`.