Skip to content

Commit 94a6ecb

Browse files
fix: docs, polish readme to include user custom_schemas for the SSO setup (#10)
## what - refine example in readme to include how we reference SSO with AWS ## why - let's make it explicitly clear how this module makes it easier to manage Google Workspace settings <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Updated the README for improved clarity and added an example demonstrating how to specify custom schemas for Google Workspace users. - Reformatted provider block comments for better readability. - Included an example of assigning complex role information to users using custom schemas. - **Style** - Updated schema names in the example user configuration for consistency. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 3e9dfc3 commit 94a6ecb

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ Once you've completed the setup process, your provider block should look like th
2929

3030
```hcl
3131
provider "googleworkspace" {
32-
# Use 'my_customer' as an alias for your account's customerId to ensure compatibility with Google's API
33-
# For example, custom schemas on the user object will fail if the customer_id is set to your actual customer_id
34-
# For more details: https://developers.google.com/workspace/admin/directory/reference/rest/v1/schemas/get
32+
# Use 'my_customer' as an alias for your account's customerId to ensure compatibility with
33+
# Google's API. For example, custom schemas on the user object will fail if the customer_id
34+
# is set to your actual customer_id
35+
# For more details, see: https://developers.google.com/workspace/admin/directory/reference/rest/v1/schemas/get
3536
customer_id = "my_customer"
3637
3738
credentials = "/path/to/credentials/my-google-project-credentials-1234567890.json"
@@ -65,6 +66,20 @@ module "googleworkspace_users_groups" {
6566
role = "member"
6667
}
6768
}
69+
custom_schemas = [
70+
{
71+
schema_name = "Client1"
72+
schema_values = {
73+
Role = "[\"arn:aws:iam::111111111111:role/GoogleAppsAdmin\",\"arn:aws:iam::111111111111:saml-provider/GoogleApps\"]"
74+
}
75+
},
76+
{
77+
schema_name = "Client2"
78+
schema_values = {
79+
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\"]"
80+
}
81+
}
82+
]
6883
}
6984
}
7085

examples/import-existing-org/users.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ first.last@example.com:
1010
family_name: Last
1111
given_name: First
1212
custom_schemas:
13-
- schema_name: AWS_SSO_for_Client123
13+
- schema_name: AWS_SSO_for_Client1
1414
schema_values:
1515
Role: '["arn:aws:iam::111111111111:role/GoogleAppsAdmin","arn:aws:iam::111111111111:saml-provider/GoogleApps"]'
16-
- schema_name: AWS_SSO_for_Client456
16+
- schema_name: AWS_SSO_for_Client2
1717
schema_values:
1818
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"]'
1919

0 commit comments

Comments
 (0)