Docs

Resource Groups

Use Resource Groups in Facets to bundle related services, databases, and caches for team-based access control, selective releases, and bulk operations.

Resource Groups are a key feature for organizing and managing resources within the Facets platform, allowing for better control, collaboration, and access management.

  • They provide a structured approach to organizing and managing resources.
  • They allow you to bundle related resources together, such as services, databases, and caches, simplifying resource management and aligning with your team and pod structures.

Use Cases for Resource Groups

  • Team-Based Access Control: Create Resource Groups for each team or department, granting access only to the resources they need.
  • Segmentation in Release: Use this segmentation to release dependent resources together while performing selective release.
  • Project-Based Organization: Group resources based on the Projects to manage them separately.
  • Perform Bulk Operations: Filter out resources in the resource center based on resource groups to perform bulk operations like Enable and Disable.

How to Create a Resource Group

To create a Resource Group:

  1. Navigate to Settings > Resource Groups from the left pane.
    This page lists all the Resource Groups created within the Facets Control Plane.
  2. Click Create Resource Group.
  3. In the Add Resource Group drawer, enter the Resource Group Name.
    Note: The name must be between 3 and 15 characters, cannot contain whitespace, and must be unique within the Control Plane.
  4. Click Save Changes.

The group is created empty. To put resources into it, open the group, click Update Resources, select the Project, and then select the resources you want in the group.

Interactive walkthrough:

How to Manage Access to Resource Groups

  • Assigning User Groups: Resource Groups can be assigned to user groups, ensuring that only users within those groups have access to the specified resources.

From the CLI

Every Resource Group operation is also available from raptor.

Create, list, and inspect

# Create a group
raptor create resource-group --name production-resources

# List every group. Aliases: resourcegroups, rg
raptor get resource-groups

# List only the groups the current user can access
raptor get resource-groups --me

# Inspect one group
raptor get resource-group GROUP_ID -o json

Rename and delete

raptor set resource-group GROUP_ID --name new-name

raptor delete resource-group production-resources
raptor delete resource-group production-resources --yes

Delete asks for confirmation. In a non-interactive context with no TTY it refuses instead of failing silently, so scripts and CI jobs have to pass --yes.

Attach and detach resources

Resources are identified as TYPE/NAME, for example service/api or postgres/main-db.

# Attach specific resources
raptor attach resource service/api postgres/main-db --group production-resources -p myproject

# Attach every resource of one kind in the project
raptor attach resource --type pubsub --group production-resources -p myproject

# Attach the newline-delimited TYPE/NAME entries listed in a file
raptor attach resource --resources-file resources.txt --group production-resources -p myproject

# Detach
raptor detach resource service/api --group production-resources -p myproject

Three properties of these commands are worth knowing:

  • Group names are unique. On delete, attach, and detach, the group can be identified by its ID or by its name, so a name works wherever an ID does.
  • Attaching is additive and idempotent. A resource's other group memberships are preserved and a resource already in the group is left unchanged, so one resource can sit in several groups.
  • Attach and detach are project-scoped, so -p is required on both. Resource-group membership is a Control Plane (RBAC) construct and is independent of blueprint branches and PRs.