|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "googleworkspace_group_members Resource - terraform-provider-googleworkspace" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + Group Members resource manages Google Workspace Groups Members. Group Members resides under the https://www.googleapis.com/auth/admin.directory.group client scope. |
| 7 | +--- |
| 8 | + |
| 9 | +# googleworkspace_group_members (Resource) |
| 10 | + |
| 11 | +Group Members resource manages Google Workspace Groups Members. Group Members resides under the `https://www.googleapis.com/auth/admin.directory.group` client scope. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```terraform |
| 16 | +resource "googleworkspace_group" "sales" { |
| 17 | + |
| 18 | +} |
| 19 | +
|
| 20 | +resource "googleworkspace_user" "michael" { |
| 21 | + primary_email = "[email protected]" |
| 22 | + password = "34819d7beeabb9260a5c854bc85b3e44" |
| 23 | + hash_function = "MD5" |
| 24 | +
|
| 25 | + name { |
| 26 | + family_name = "Scott" |
| 27 | + given_name = "Michael" |
| 28 | + } |
| 29 | +} |
| 30 | +
|
| 31 | +resource "googleworkspace_user" "frank" { |
| 32 | + primary_email = "[email protected]" |
| 33 | + password = "2095312189753de6ad47dfe20cbe97ec" |
| 34 | + hash_function = "MD5" |
| 35 | +
|
| 36 | + name { |
| 37 | + family_name = "Scott" |
| 38 | + given_name = "Frank" |
| 39 | + } |
| 40 | +} |
| 41 | +
|
| 42 | +resource "googleworkspace_group_members" "sales" { |
| 43 | + group_id = googleworkspace_group.sales.id |
| 44 | +
|
| 45 | + members { |
| 46 | + email = googleworkspace_user.michael.primary_email |
| 47 | + role = "MANAGER" |
| 48 | + } |
| 49 | +
|
| 50 | + members { |
| 51 | + email = googleworkspace_user.frank.primary_email |
| 52 | + role = "MEMBER" |
| 53 | + } |
| 54 | +} |
| 55 | +``` |
| 56 | + |
| 57 | +<!-- schema generated by tfplugindocs --> |
| 58 | +## Schema |
| 59 | + |
| 60 | +### Required |
| 61 | + |
| 62 | +- **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. |
| 63 | +- **members** (Block Set, Min: 1) The members of the group (see [below for nested schema](#nestedblock--members)) |
| 64 | + |
| 65 | +### Read-Only |
| 66 | + |
| 67 | +- **etag** (String) ETag of the resource. |
| 68 | +- **id** (String) The ID of this resource. |
| 69 | + |
| 70 | +<a id="nestedblock--members"></a> |
| 71 | +### Nested Schema for `members` |
| 72 | + |
| 73 | +Required: |
| 74 | + |
| 75 | +- **email** (String) The member's email address. A member can be a user or another group. This property isrequired 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. |
| 76 | + |
| 77 | +Optional: |
| 78 | + |
| 79 | +- **delivery_settings** (String) 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. Defaults to `ALL_MAIL`. |
| 80 | +- **role** (String) 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. Defaults to `MEMBER`. |
| 81 | +- **type** (String) 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. Defaults to `USER`. |
| 82 | + |
| 83 | +Read-Only: |
| 84 | + |
| 85 | +- **id** (String) The unique ID of the group member. A member id can be used as a member request URI's memberKey. |
| 86 | +- **status** (String) Status of member. |
| 87 | + |
| 88 | +## Import |
| 89 | + |
| 90 | +Import is supported using the following syntax: |
| 91 | + |
| 92 | +```shell |
| 93 | +terraform import googleworkspace_group_members.sales groups/01abcde23fg4h5i |
| 94 | +``` |
0 commit comments