Group Users

A GroupUser is a record about membership of a User within a Group.

Creating GroupUsers

GroupUsers can be created via the normal create action. When using the update action, if the GroupUser record does not exist for the given user/group IDs it will be created.

Resource Schema

Required

PropertyDescription
group_id
Int64
Group ID
user_id
Int64
User ID

Optional

PropertyDescription
admin
Bool
Is this user an administrator of this group?

Read Only

PropertyDescription
group_name
String
Group name
username
String
Username of the user

Example Resource

resource "files_group_user" "example_group_user" {
  group_id = 1
  user_id  = 1
  admin    = false
}

Resource Import

This Resource supports importing using the following syntax:

Example Import Command

# Group Users can be imported by specifying the group_id and user_id.
terraform import files_group_user.example_group_user 1,1

Data Source Schema

Required

PropertyDescription
group_id
Int64
Group ID
user_id
Int64
User ID

Read Only

PropertyDescription
group_name
String
Group name
admin
Bool
Is this user an administrator of this group?
username
String
Username of the user

Example Data Source

data "files_group_user" "example_group_user" {
  group_id = 1
  user_id  = 1
}