-
Notifications
You must be signed in to change notification settings - Fork 911
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #787 from GoogleCloudPlatform/lcaggio/groups
Support manager role in cloud identity group module
- Loading branch information
Showing
5 changed files
with
45 additions
and
18 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,10 @@ To use this module you must either run terraform as a user that has the Groups A | |
|
||
Please note that the underlying terraform resources only allow the creation of groups with members that are part of the organization. If you want to create memberships for identities outside your own organization, you have to manually allow members outside your organization in the Cloud Identity admin console. | ||
|
||
As of version 3.50 of the GCP Terraform provider two operations are not working: | ||
As of version 4.34 of the GCP Terraform provider one operation is not working: | ||
- removing a group that has at least one OWNER managed by terraform ([bug](https://github.com/hashicorp/terraform-provider-google/issues/7617)) | ||
- removing a role from an existing membership ([bug](https://github.com/hashicorp/terraform-provider-google/issues/7616)) | ||
|
||
Until those two bugs are fixed, this module will only support the creation of MEMBER memberships. | ||
Until that bug is fixed, this module will only support the creation of MEMBER and MANAGER memberships. | ||
|
||
## Examples | ||
|
||
|
@@ -31,6 +30,26 @@ module "group" { | |
} | ||
# tftest modules=1 resources=4 | ||
``` | ||
|
||
### Group with managers | ||
```hcl | ||
module "group" { | ||
source = "./modules/cloud-identity-group" | ||
customer_id = "customers/C01234567" | ||
name = "[email protected]" | ||
display_name = "My group name 2" | ||
description = "My group 2 Description" | ||
members = [ | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]" | ||
] | ||
managers = [ | ||
"[email protected]" | ||
] | ||
} | ||
# tftest modules=1 resources=5 | ||
``` | ||
<!-- BEGIN TFDOC --> | ||
|
||
## Variables | ||
|
@@ -39,9 +58,10 @@ module "group" { | |
|---|---|:---:|:---:|:---:| | ||
| [customer_id](variables.tf#L17) | Directory customer ID in the form customers/C0xxxxxxx. | <code>string</code> | ✓ | | | ||
| [display_name](variables.tf#L32) | Group display name. | <code>string</code> | ✓ | | | ||
| [name](variables.tf#L43) | Group ID (usually an email). | <code>string</code> | ✓ | | | ||
| [name](variables.tf#L49) | Group ID (usually an email). | <code>string</code> | ✓ | | | ||
| [description](variables.tf#L26) | Group description. | <code>string</code> | | <code>null</code> | | ||
| [members](variables.tf#L37) | List of group members. | <code>list(string)</code> | | <code>[]</code> | | ||
| [managers](variables.tf#L37) | List of group managers. | <code>list(string)</code> | | <code>[]</code> | | ||
| [members](variables.tf#L43) | List of group members. | <code>list(string)</code> | | <code>[]</code> | | ||
|
||
## Outputs | ||
|
||
|
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