### Google Workspace Provider Configuration Source: https://github.com/masterpointio/terraform-googleworkspace-users-groups-automation/blob/main/README.md Configure the Google Workspace provider with credentials and impersonated user email for domain-wide delegation. Ensure correct OAuth scopes are set for user and group management. ```hcl provider "googleworkspace" { # Use 'my_customer' as an alias for your account's customerId to ensure compatibility with # Google's API. For example, custom schemas on the user object will fail if the customer_id # is set to your actual customer_id # For more details, see: https://developers.google.com/workspace/admin/directory/reference/rest/v1/schemas/get customer_id = "my_customer" credentials = "/path/to/credentials/my-google-project-credentials-1234567890.json" impersonated_user_email = "my_impersonated_user_email@my_domain.com" oauth_scopes = [ "https://www.googleapis.com/auth/admin.directory.group", "https://www.googleapis.com/auth/admin.directory.user", "https://www.googleapis.com/auth/admin.directory.userschema", "https://www.googleapis.com/auth/apps.groups.settings", "https://www.googleapis.com/auth/iam", ] } ``` -------------------------------- ### Configure Google Workspace Users and Groups with Terraform Source: https://github.com/masterpointio/terraform-googleworkspace-users-groups-automation/blob/main/README.md This snippet demonstrates how to define users and groups in Google Workspace using the terraform-googleworkspace-users-groups-automation module. It includes user details, group memberships, and custom schema configurations for user roles. ```hcl module "googleworkspace_users_groups" { source = "masterpointio/users-groups-automation/googleworkspace" version = "X.X.X" users = { "first.last@example.com" = { primary_email = "first.last@example.com" family_name = "Last" given_name = "First" password = "example-password" groups = { "platform" = { role = "member" } } custom_schemas = [ { schema_name = "Client1" schema_values = { Role = "[\"arn:aws:iam::111111111111:role/GoogleAppsAdmin\",\"arn:aws:iam::111111111111:saml-provider/GoogleApps\"]" } }, { schema_name = "Client2" schema_values = { Role = "[\"arn:aws:iam::222222222222:role/xyz-identity-reader,arn:aws:iam::222222222222:saml-provider/xyz-identity-acme-gsuite\", \"arn:aws:iam::222222222222:role/xyz-identity-admin,arn:aws:iam::222222222222:saml-provider/xyz-identity-acme-gsuite\"]" } } ] } } groups = { "platform" = { name = "Platform" email = "platform@example.com" settings = { who_can_join = "ALL_IN_DOMAIN_CAN_JOIN" } } } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.