qumulo_local_group_member (Resource)¶
Manages a user's membership in a secondary local group on a Qumulo cluster.
This resource adds a user as a member of a group (secondary group membership). This is separate from the user's primary group, which is set on the user resource itself.
Example Usage¶
Add User to Secondary Group¶
resource "qumulo_local_group" "users" {
connection_profile = "prod"
name = "users"
}
resource "qumulo_local_group" "developers" {
connection_profile = "prod"
name = "developers"
}
resource "qumulo_local_user" "alice" {
connection_profile = "prod"
name = "alice"
primary_group = qumulo_local_group.users.id
}
# Add alice to the developers group as a secondary group
resource "qumulo_local_group_member" "alice_developers" {
connection_profile = "prod"
group_id = qumulo_local_group.developers.id
user_id = qumulo_local_user.alice.id
}
Multiple Secondary Groups¶
locals {
alice_secondary_groups = [
qumulo_local_group.developers.id,
qumulo_local_group.qa.id,
]
}
resource "qumulo_local_group_member" "alice_groups" {
for_each = toset(local.alice_secondary_groups)
connection_profile = "prod"
group_id = each.value
user_id = qumulo_local_user.alice.id
}
Import¶
Group memberships can be imported using the format connection_profile,group_id,user_id:
~> Note: This resource manages secondary group membership only. A user's primary group
is managed via the primary_group attribute on the qumulo_local_user resource.
Schema¶
Required¶
connection_profile(String) Name of a connection profile from the provider block. See the provider reference for how to define profiles.group_id(String) The ID of the group to add the user to.user_id(String) The ID of the user to add to the group.
Read-Only¶
id(String) The composite ID of the membership in the formatgroup_id/user_id.