Skip to content
This repository has been archived by the owner on Jun 27, 2021. It is now read-only.

[gsuite_group_settings] who_can_moderate_members competing with who_can_approve_members #158

Open
natalysheinin opened this issue Oct 21, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@natalysheinin
Copy link
Contributor

Problem

I think both of these settings manage the same google attributes because if you have one set to something other than the default (default is ALL_MANAGERS_CAN_APPROVE), then the terraform plan attempts to change the other settings to the default.

Steps to Replicate

For example, let's say this is your tf config:

resource "gsuite_group_settings" "gsuite_group_settings" {
  email = gsuite_group.gsuite_group.email
 ...
  who_can_moderate_members = "NONE"
...
} 

When you run terraform plan for the first time, it creates the group + group settings.

When you run terraform plan the second time (without making any code changes):

resource "gsuite_group_settings" "gsuite_group_settings" {
    who_can_approve_members        = "NONE_CAN_APPROVE" -> "ALL_MANAGERS_CAN_APPROVE"

When you run terraform plan the third time (without making any code changes):

resource "gsuite_group_settings" "gsuite_group_settings" {
    who_can_moderate_members       = "OWNERS_AND_MANAGERS" -> "NONE"

Proposed Solution

One of these settings should be deprecated.

@sioncojp
Copy link
Contributor

According to google-api-go-client, WhoCanApproveMembers is deprecated and merged into whoCanModerateMembers.

Therefore, I think it's better to treat who_can_approve_members as deprecated.

https://github.com/googleapis/google-api-go-client/blob/master/groupssettings/v1/groupssettings-gen.go#L373

@sioncojp
Copy link
Contributor

Also, the structs in group_settings have similar deprecated parts, so we need to consider them.

@DeviaVir DeviaVir added the enhancement New feature or request label Oct 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants