Overview
This article outlines the steps required to delete IAM Groups in the HashiCorp Cloud Platform (HCP). Groups are used to manage user access and permissions within an HCP organization. If a group is no longer required, it can be deleted following the steps below.
Pre-requisites
You must have appropriate permissions (e.g., Organization Admin/Owner) to delete a group.
It is recommended to remove all the group members before the group can be deleted.
Steps Involved
Step 1: Sign in to HCP
Navigate to the HashiCorp Cloud Platform (HCP).
Sign in using your credentials.
Select the appropriate Organization.
Step 2: Navigate to Groups
From the left navigation menu, select Access Control (IAM).
Click Groups.
Locate and select the group you wish to delete.
Step 3: Remove All Group Members (Recommended)
Open the selected group.
Navigate to the Members tab.
-
Remove each member individually:
Select the member.
Click Remove.
Confirm the action.
Repeat until no members remain in the group.
Confirm that the group has zero members before proceeding.
Step 4: Delete the Group
Return to the group’s main page.
Select Delete Group from the available actions.
Confirm the deletion when prompted.
Once confirmed, the group is permanently deleted and cannot be restored.
After Deletion
The group will no longer appear in the Groups list.
Any access previously granted through this group will no longer apply.
Users who were members of the group will lose permissions associated with it.
Troubleshooting
If you are unable to delete the group:
Confirm that you have sufficient permissions within the organization.
Refresh the UI and attempt the deletion again.
References :
https://developer.hashicorp.com/hcp/docs/hcp/iam/groups
https://developer.hashicorp.com/hcp/docs/cli/commands/iam/groups/delete
https://developer.hashicorp.com/hcp/docs/cli/commands/iam/groups/iam/delete-binding