tharsis_group
Defines and manages a group.
Example Usage​
resource "tharsis_group" "top_level" {
name = "my-group"
description = "A top-level group."
}
resource "tharsis_group" "nested" {
name = "my-sub-group"
description = "A nested group."
parent_id = tharsis_group.top_level.id
}
Behavior​
- Groups organize workspaces hierarchically. A group can contain subgroups and workspaces.
- Variables, managed identities, memberships, service accounts, runners, Terraform modules, and VCS providers set on a group are inherited by its child groups and workspaces.
- The parent is given with either
parent_idorparent_path. Omit both to create a top-level group, which only system administrators can do. - A name may contain only numerals, lowercase letters, hyphens, and underscores, and cannot start or end with a hyphen or underscore. It cannot be changed after creation.
Deletion​
Deleting a group is irreversible. It also deletes all nested groups and workspaces, along with their state.
Schema​
Required​
name(String) The name of the group.
Optional​
description(String) A description of the group.parent_id(String) The ID or TRN of the parent group.parent_path(String) Full path of the parent namespace.
Read-Only​
full_path(String) The path of the parent namespace plus the name of the group.id(String) String identifier of the group.last_updated(String) Timestamp when this group was most recently updated by Terraform.
Import​
Import is supported using the following syntax:
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
# A group can be imported by its TRN, which is "trn:group:" followed by the
# group's full path. A top-level group is just its name, for example
# "trn:group:my-group".
import {
to = tharsis_group.nested
id = "trn:group:my-group/my-sub-group"
}
# The group's ID also works as the id, shown by the "id" attribute or in the
# Tharsis UI.