cloud-foundation-fabric/blueprints/factories/cloud-identity-group-factory/README.md

70 lines
1.8 KiB
Markdown
Raw Normal View History

2022-08-31 07:25:29 -07:00
# Google Cloud Identity Group Factory
2022-09-14 14:39:09 -07:00
This module allows creation and management of Cloud Identity Groups by defining them in well formatted `yaml` files.
2022-08-31 07:25:29 -07:00
Yaml abstraction for Groups can simplify groups creation and members management. Yaml can be simpler and clearer comparing to HCL.
## Example
### Terraform code
```hcl
2023-02-24 09:28:55 -08:00
module "groups" {
source = "./fabric/blueprints/factories/cloud-identity-group-factory"
2022-12-18 11:37:16 -08:00
customer_id = "customers/C0xxxxxxx"
data_dir = "data"
2022-08-31 07:25:29 -07:00
}
2023-02-24 09:28:55 -08:00
# tftest modules=2 resources=3 files=group1 inventory=example.yaml
```
```yaml
# tftest-file id=group1 path=data/group1@example.com.yaml
display_name: Group 1
description: Group 1
members:
- user1@example.com
managers:
- user2@example.com
2022-08-31 07:25:29 -07:00
```
### Configuration Structure
2022-09-14 14:39:09 -07:00
2022-08-31 07:25:29 -07:00
Groups configuration should be placed in a set of yaml files. The name of the file identify the name of the group.
```bash
├── data
├── group1@domain.com.yaml
   ├── group2@domain.com.yaml
```
### Group definition format and structure
Within each file, the group entry structure is following:
```yaml
2022-09-01 06:18:50 -07:00
display_name: Group 1 # Group display name.
description: Group 1 description # Group description.
2022-08-31 07:25:29 -07:00
members: # List of group members.
2022-09-01 06:18:50 -07:00
- user_1@example.com
- user_2@example.com
2022-08-31 07:25:29 -07:00
managers: # List of group managers.
2022-09-01 06:18:50 -07:00
- manager_1@example.com
2022-08-31 07:25:29 -07:00
```
<!-- BEGIN TFDOC -->
## Variables
| name | description | type | required | default |
|---|---|:---:|:---:|:---:|
| [customer_id](variables.tf#L17) | Directory customer ID in the form customers/C0xxxxxxx. | <code>string</code> | ✓ | |
2022-09-01 06:18:50 -07:00
| [data_dir](variables.tf#L22) | Relative path for the folder storing configuration data. | <code>string</code> | ✓ | |
## Outputs
| name | description | sensitive |
|---|---|:---:|
| [group_id](outputs.tf#L17) | Group name => Group ID mapping. | |
2022-08-31 07:25:29 -07:00
<!-- END TFDOC -->