Group Member resource manages Google Workspace Groups Members. Group Member resides under the https://www.googleapis.com/auth/admin.directory.group
client scope.
resource "googleworkspace_group" "sales" {
email = "sales@example.com"
}
resource "googleworkspace_user" "michael" {
primary_email = "michael.scott@example.com"
password = "34819d7beeabb9260a5c854bc85b3e44"
hash_function = "MD5"
name {
family_name = "Scott"
given_name = "Michael"
}
}
resource "googleworkspace_group_member" "manager" {
group_id = googleworkspace_group.sales.id
email = googleworkspace_user.michael.primary_email
role = "MANAGER"
}
email
(String) The member's email address. A member can be a user or another group. This property is required when adding a member to a group. The email must be unique and cannot be an alias of another group. If the email address is changed, the API automatically reflects the email address changes.group_id
(String) Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.delivery_settings
(String) Defaults to ALL_MAIL
. Defines mail delivery preferences of member. Acceptable values are:
ALL_MAIL
: All messages, delivered as soon as they arrive.DAILY
: No more than one message a day.DIGEST
: Up to 25 messages bundled into a single message.DISABLED
: Remove subscription.NONE
: No messages.role
(String) Defaults to MEMBER
. The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. Acceptable values are:
MANAGER
: This role is only available if the Google Groups for Business is enabled using the Admin Console. A MANAGER
role can do everything done by an OWNER
role except make a member an OWNER
or delete the group. A group can have multiple MANAGER
members. MEMBER
: This role can subscribe to a group, view discussion archives, and view the group's membership list.OWNER
: This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER.timeouts
(Block, Optional) (see below for nested schema)type
(String) Defaults to USER
. The type of group member. Acceptable values are:
CUSTOMER
: The member represents all users in a domain. An email address is not returned and the ID returned is the customer ID. GROUP
: The member is another group. USER
: The member is a user.etag
(String) ETag of the resource.id
(String) The ID of this resource.member_id
(String) The unique ID of the group member. A member id can be used as a member request URI's memberKey.status
(String) Status of member.timeouts
Optional:
create
(String)update
(String)Import is supported using the following syntax:
terraform import googleworkspace_group_member.manager groups/01abcde23fg4h5i/members/123456789012345678901