You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## what
- Add the concept of `custom_schemas` to `var.users` and
`googleworkspace_user.defaults`
- Custom schemas enable SSO between gsuite and AWS using SAML.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added support for specifying custom schemas for users, allowing
multiple custom schema entries with configurable names and values.
- **Documentation**
- Updated documentation to describe the new custom schemas attribute and
its usage.
- **Tests**
- Introduced new tests to validate the handling of user custom schemas
and ensure correct behavior.
- **Bug Fixes**
- Added validation to ensure all custom schema values are JSON
encodable, preventing configuration errors.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
| <aname="input_stage"></a> [stage](#input\_stage)| ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' |`string`|`null`| no |
134
135
| <aname="input_tags"></a> [tags](#input\_tags)| Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).<br/>Neither the tag keys nor the tag values will be modified by this module. |`map(string)`|`{}`| no |
135
136
| <aname="input_tenant"></a> [tenant](#input\_tenant)| ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for |`string`|`null`| no |
136
-
| <a name="input_users"></a> [users](#input\_users) | List of users | <pre>map(object({<br/> # addresses<br/> aliases : optional(list(string), []),<br/> archived : optional(bool, false),<br/> change_password_at_next_login : optional(bool),<br/> # custom_schemas<br/> # emails<br/> # external_ids<br/> family_name : string,<br/> given_name : string,<br/> groups : optional(map(object({<br/> role : optional(string, "MEMBER"),<br/> delivery_settings : optional(string, "ALL_MAIL"),<br/> type : optional(string, "USER"),<br/> })), {}),<br/> # ims<br/> include_in_global_address_list : optional(bool),<br/> ip_allowlist : optional(bool),<br/> is_admin : optional(bool),<br/> # keywords<br/> # languages<br/> # locations<br/> org_unit_path : optional(string),<br/> # organizations<br/> # phones<br/> # posix_accounts<br/> primary_email : string,<br/> recovery_email : optional(string),<br/> recovery_phone : optional(string),<br/> # relations<br/> # ssh_public_keys<br/> suspended : optional(bool),<br/> # timeouts<br/> # websites<br/><br/> # User attributes with unique constraints<br/><br/> # password and hash_function<br/> # If a hashFunction is specified, the password must be a valid hash key.<br/> # If it's not specified, the password should be in clear text and between<br/> # 8–100 ASCII characters.<br/> # https://developers.google.com/workspace/admin/directory/v1/guides/manage-users<br/> hash_function : optional(string),<br/> password : optional(string),<br/> }))</pre> | `{}` | no |
137
+
| <a name="input_users"></a> [users](#input\_users) | List of users | <pre>map(object({<br/> # addresses<br/> aliases : optional(list(string), []),<br/> archived : optional(bool, false),<br/> change_password_at_next_login : optional(bool),<br/> custom_schemas : optional(list(object({<br/> schema_name : string,<br/> schema_values : optional(map(string), {}),<br/> })), []),<br/> # emails<br/> # external_ids<br/> family_name : string,<br/> given_name : string,<br/> groups : optional(map(object({<br/> role : optional(string, "MEMBER"),<br/> delivery_settings : optional(string, "ALL_MAIL"),<br/> type : optional(string, "USER"),<br/> })), {}),<br/> # ims<br/> include_in_global_address_list : optional(bool),<br/> ip_allowlist : optional(bool),<br/> is_admin : optional(bool),<br/> # keywords<br/> # languages<br/> # locations<br/> org_unit_path : optional(string),<br/> # organizations<br/> # phones<br/> # posix_accounts<br/> primary_email : string,<br/> recovery_email : optional(string),<br/> recovery_phone : optional(string),<br/> # relations<br/> # ssh_public_keys<br/> suspended : optional(bool),<br/> # timeouts<br/> # websites<br/><br/> # User attributes with unique constraints<br/><br/> # password and hash_function<br/> # If a hashFunction is specified, the password must be a valid hash key.<br/> # If it's not specified, the password should be in clear text and between<br/> # 8–100 ASCII characters.<br/> # https://developers.google.com/workspace/admin/directory/v1/guides/manage-users<br/> hash_function : optional(string),<br/> password : optional(string),<br/> }))</pre> | `{}` | no |
error_message="Expected rendered value to be encoded json string, got: ${googleworkspace_user.defaults["first.last@example.com"].custom_schemas[1].schema_values["Role"]}"
error_message="Expected OtherKey value to be 'OtherValue', got: ${googleworkspace_user.defaults["schema.test@example.com"].custom_schemas[0].schema_values["OtherKey"]}"
error_message="Expected role to be capitalized to 'MEMBER', got: ${googleworkspace_group_member.user_to_groups["test-group@example.com/user.type@example.com"].role}"
error_message="Expected type to be capitalized to 'USER', got: ${googleworkspace_group_member.user_to_groups["test-group@example.com/user.type@example.com"].type}"
0 commit comments