Open carlpett opened 2 years ago
@rileykarson Is there a way for us to contribute this? If so, we'd be happy to, but would need some help with the questions above.
Yes, contributions can be made using documentation at https://googlecloudplatform.github.io/magic-modules/. For this, it might be worth copying an existing data source like DataSourceGoogleCloudIdentityGroupMemberships
and working off of that.
Community Note
Description
Currently
google_cloud_identity_group_memberships
only returns direct memberships. In larger organisations, it is common to build trees of groups-in-groups so eg dev@domain has members dev-us@domain and dev-eu@domain which in turn may have subgroups, etc.What we want is a listing of all members, regardless of group membership depth. The Cloud Identity APIs used in the data source today already support this by way of
GroupsMembershipsService.SearchTransitiveGroups
.New or Affected Resource(s)
google_cloud_identity_group_memberships
Potential Terraform Configuration
References
Docs: https://pkg.go.dev/google.golang.org/api/cloudidentity/v1#GroupsMembershipsService.SearchTransitiveGroups Also noted there is that this is only supported on higher tiers of Google Workspace, so some warning in the docs may be in order.
Other
We'd be willing to contribute the code, but I'm unsure if this needs to go through the magician? Also debatable whether to do this by flag in the existing data source, or a if a new one is better.
b/308247921