-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New: add group_settings support INPRO-372
- Loading branch information
Showing
12 changed files
with
104 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# --------------------------------------------------------------------------------------------------------------------- | ||
# GOOGLE GROUP SETTINGS | ||
# --------------------------------------------------------------------------------------------------------------------- | ||
# | ||
# For details on allowed parameters check https://registry.terraform.io/providers/DeviaVir/gsuite/latest/docs/resources/group_settings | ||
|
||
anyone-mail-allowed: | ||
allow_external_members: "true" | ||
allow_web_posting: "false" | ||
archive_only: "false" | ||
include_in_global_address_list: "true" | ||
spam_moderation_level: "ALLOW" | ||
who_can_contact_owner: "ALL_MANAGERS_CAN_CONTACT" | ||
who_can_discover_group: "ALL_IN_DOMAIN_CAN_DISCOVER" | ||
who_can_join: "INVITED_CAN_JOIN" | ||
who_can_leave_group: "NONE_CAN_LEAVE" | ||
who_can_post_message: "ANYONE_CAN_POST" | ||
who_can_view_group: "ALL_MEMBERS_CAN_VIEW" | ||
who_can_view_membership: "ALL_IN_DOMAIN_CAN_VIEW" | ||
|
||
# default | ||
default: | ||
allow_external_members: null | ||
allow_web_posting: null | ||
archive_only: null | ||
include_in_global_address_list: null | ||
spam_moderation_level: null | ||
who_can_contact_owner: null | ||
who_can_discover_group: null | ||
who_can_join: null | ||
who_can_leave_group: null | ||
who_can_post_message: null | ||
who_can_view_group: null | ||
who_can_view_membership: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
one-group: | ||
email: '[email protected]' | ||
name: 'Example group' | ||
settings: 'anyone-mail-allowed' | ||
aliases: | ||
- '[email protected]' | ||
groups: [] | ||
|
@@ -16,6 +17,7 @@ one-group: | |
another-group: | ||
email: '[email protected]' | ||
name: 'Another Example group' | ||
settings: 'default' | ||
aliases: [] | ||
groups: | ||
- 'one-group' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# --------------------------------------------------------------------------------------------------------------------- | ||
# EXTERNAL USER WITH GROUP MEMBERSHIPS | ||
# --------------------------------------------------------------------------------------------------------------------- | ||
|
||
[email protected]: | ||
roles: | ||
- 'one-group' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
terraform { | ||
required_providers { | ||
gsuite = { | ||
source = "DeviaVir/gsuite" | ||
version = "0.1.58" | ||
} | ||
} | ||
} | ||
|
||
# --------------------------------------------------------------------------------------------------------------------- | ||
# Ressource documentation: https://registry.terraform.io/providers/DeviaVir/gsuite/latest/docs/resources/group_settings | ||
# --------------------------------------------------------------------------------------------------------------------- | ||
|
||
resource "gsuite_group_settings" "group_settings" { | ||
email = var.group.email | ||
|
||
allow_external_members = var.group_settings[var.group.settings].allow_external_members | ||
allow_web_posting = var.group_settings[var.group.settings].allow_web_posting | ||
archive_only = var.group_settings[var.group.settings].archive_only | ||
include_in_global_address_list = var.group_settings[var.group.settings].include_in_global_address_list | ||
spam_moderation_level = var.group_settings[var.group.settings].spam_moderation_level | ||
who_can_contact_owner = var.group_settings[var.group.settings].who_can_contact_owner | ||
who_can_discover_group = var.group_settings[var.group.settings].who_can_discover_group | ||
who_can_join = var.group_settings[var.group.settings].who_can_join | ||
who_can_leave_group = var.group_settings[var.group.settings].who_can_leave_group | ||
who_can_post_message = var.group_settings[var.group.settings].who_can_post_message | ||
who_can_view_group = var.group_settings[var.group.settings].who_can_view_group | ||
who_can_view_membership = var.group_settings[var.group.settings].who_can_view_membership | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
variable "group_settings" { | ||
type = any | ||
description = "contains all defined group setting templates for Google Groups" | ||
} | ||
|
||
variable "group" { | ||
type = any | ||
description = "contains an object representing a Google Group" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Module for adding external users to groups | ||
This module is optional. For details on how to use it check [examples](examples/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters