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
Allow skipping Google Workspace SA and API provisioning via connector settings.
Expose google_workspace_provision_service_accounts and google_workspace_enable_apis in google_workspace_connector_settings so customers can manage those GCP steps outside Terraform, with matching TODO outputs and a state move for existing service accounts.
Copy file name to clipboardExpand all lines: docs/sources/google-workspace/README.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,16 +108,32 @@ While not recommended, it is possible to set up Google API clients without Terra
108
108
109
109
Then follow the steps in the next section to create the keys for the Oauth Clients.
110
110
111
+
If your organization's policies don't allow Terraform to manage some or all of these GCP resources, you can still use our Terraform modules for the rest of your deployment and disable the parts you must do manually via `google_workspace_connector_settings` in your `terraform.tfvars`:
When any of these are `false`, Terraform will skip creating the corresponding resources and instead emit TODO files (or `todos_1` outputs, if configured) with instructions to complete those steps outside of Terraform.
122
+
111
123
NOTE: if you are creating connections to multiple Google Workspace™ sources, you can use a single OAuth client and share it between all the proxy instances. You just need to authorize the entire superset of Oauth scopes required by those connnections for the OAuth Client via the Google Workspace™ Admin console.
112
124
113
125
### Provisioning API Keys without Terraform
114
126
115
127
If your organization's policies don't allow GCP service account keys to be managed via Terraform (or you lack the perms to do so), you can still use our Terraform modules to create the clients, and just add the following to your `terraform.tfvars` to disable provisioning of the keys:
116
128
117
129
```hcl
118
-
google_workspace_provision_keys = false
130
+
google_workspace_connector_settings = {
131
+
google_workspace_provision_keys = false
132
+
}
119
133
```
120
134
135
+
The deprecated top-level variable `google_workspace_provision_keys` is still supported, but the map form above is preferred.
136
+
121
137
Then you can create the keys manually, and store them in your secrets manager of choice.
Copy file name to clipboardExpand all lines: infra/examples-dev/aws/google-workspace-variables.tf
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,6 @@ locals {
80
80
81
81
variable"google_workspace_connector_settings" {
82
82
type=map(any)
83
-
description="Map of configuration settings specifically for Google Workspace connectors (e.g. example users). Note that provider-controlling parameters (like GCP project IDs or impersonation SAs) remain top-level variables."
83
+
description="Map of configuration settings specifically for Google Workspace connectors. Supported keys: google_workspace_example_user, google_workspace_example_admin, google_workspace_provision_keys, google_workspace_key_rotation_days, google_workspace_provision_service_accounts, google_workspace_enable_apis. Provider-controlling parameters (like GCP project IDs or impersonation SAs) remain top-level variables."
Copy file name to clipboardExpand all lines: infra/examples-dev/gcp/google-workspace-variables.tf
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,6 @@ locals {
80
80
81
81
variable"google_workspace_connector_settings" {
82
82
type=map(any)
83
-
description="Map of configuration settings specifically for Google Workspace connectors (e.g. example users). Note that provider-controlling parameters (like GCP project IDs or impersonation SAs) remain top-level variables."
83
+
description="Map of configuration settings specifically for Google Workspace connectors. Supported keys: google_workspace_example_user, google_workspace_example_admin, google_workspace_provision_keys, google_workspace_key_rotation_days, google_workspace_provision_service_accounts, google_workspace_enable_apis. Provider-controlling parameters (like GCP project IDs or impersonation SAs) remain top-level variables."
description="Map of configuration settings specifically for Google Workspace connectors (e.g. example users). Note that provider-controlling parameters (like GCP project IDs or impersonation SAs) remain top-level variables."
240
+
description="Map of configuration settings specifically for Google Workspace connectors. Supported keys: google_workspace_example_user, google_workspace_example_admin, google_workspace_provision_keys, google_workspace_key_rotation_days, google_workspace_provision_service_accounts, google_workspace_enable_apis. Provider-controlling parameters (like GCP project IDs or impersonation SAs) remain top-level variables."
In the GCP console for `${gcp_project_id}` (or via `gcloud`), create a service account to use as the OAuth client for the `${connector_id}` connector:
2
+
3
+
-**Account ID**: `${service_account_id}`
4
+
-**Display name**: `${display_name}`
5
+
-**Description**: `${description}`
6
+
7
+
The service account email should be `${expected_service_account_email}`.
8
+
9
+
Via the GCP console: navigate to "IAM & Admin"-->"Service Accounts"-->"Create Service Account", and use the values above.
10
+
11
+
Via gcloud:
12
+
`gcloud iam service-accounts create ${service_account_id} --display-name="${display_name}"--description="${description}"--project=${gcp_project_id}`
13
+
14
+
After creating the service account, note its numeric **Client ID** (unique ID) from the service account details page. You will need it when completing domain-wide delegation setup.
15
+
16
+
See the page below for more information on provisioning Google Workspace connectors without Terraform:
0 commit comments