Skip to content

Commit 59be154

Browse files
authored
[DOC] Fix missing GCP IAM permissions for workspace creation (#5114) (#5123)
## Changes <!-- Summary of your changes that are easy to understand --> Add PSC/CMK-related permissions to GCP workspace creation guides. This fixes workspace creation failures caused by missing permissions: - Added compute.forwardingRules.get and .list (for Private Service Connect) - Added cloudkms.cryptoKeys permissions as commented examples (for CMK) - Reorganized permissions with descriptive comments - Added clarifying note to PSC guide ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [ ] `make test` run locally - [x] relevant change in `docs/` folder - [ ] covered with integration tests in `internal/acceptance` - [ ] using Go SDK - [ ] using TF Plugin Framework - [x] has entry in `NEXT_CHANGELOG.md` file
1 parent cd0e357 commit 59be154

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

NEXT_CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
### Documentation
1919

20+
* Fix missing GCP IAM permissions for workspace creation in GCP guides ([#5123](https://github.com/databricks/terraform-provider-databricks/pull/5123)).
21+
2022
### Exporter
2123

2224
### Internal Changes

docs/guides/gcp-private-service-connect-workspace.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Secure a workspace with private connectivity and mitigate data exfiltration risk
1212

1313
To work with Databricks in GCP in an automated way, please create a service account and manually add it in the [Accounts Console](https://accounts.gcp.databricks.com/users) as an account admin. Databricks account-level APIs can only be called by account owners and account admins, and can only be authenticated using Google-issued OIDC tokens. The simplest way to do this would be via [Google Cloud CLI](https://cloud.google.com/sdk/gcloud). For details, please refer to [Provisioning Databricks workspaces on GCP](gcp-workspace.md).
1414

15+
-> **Note** When using Private Service Connect, ensure that your service account has the `compute.forwardingRules.get` and `compute.forwardingRules.list` permissions in addition to the base permissions listed in the [gcp-workspace.md](gcp-workspace.md) guide. These permissions are required for managing VPC endpoints.
16+
1517
## Creating a VPC network
1618

1719
The very first step is VPC creation with the necessary resources. Please consult [main documentation page](https://docs.gcp.databricks.com/administration-guide/cloud-configurations/gcp/customer-managed-vpc.html) for **the most complete and up-to-date details on networking**. A GCP VPC is registered as [databricks_mws_networks](../resources/mws_networks.md) resource.

docs/guides/gcp-workspace.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,28 +55,41 @@ resource "google_project_iam_custom_role" "workspace_creator" {
5555
role_id = "${var.prefix}_workspace_creator"
5656
title = "Databricks Workspace Creator"
5757
permissions = [
58-
"iam.serviceAccounts.getIamPolicy",
59-
"iam.serviceAccounts.setIamPolicy",
60-
"iam.serviceAccounts.create",
61-
"iam.serviceAccounts.get",
58+
# IAM Role Management
6259
"iam.roles.create",
6360
"iam.roles.delete",
6461
"iam.roles.get",
6562
"iam.roles.update",
63+
# Service Account Management
64+
"iam.serviceAccounts.create",
65+
"iam.serviceAccounts.get",
66+
"iam.serviceAccounts.getIamPolicy",
67+
"iam.serviceAccounts.setIamPolicy",
68+
# Project Management
6669
"resourcemanager.projects.get",
6770
"resourcemanager.projects.getIamPolicy",
6871
"resourcemanager.projects.setIamPolicy",
72+
# Service Usage
6973
"serviceusage.services.get",
7074
"serviceusage.services.list",
7175
"serviceusage.services.enable",
76+
# Network Management
7277
"compute.networks.get",
7378
"compute.networks.updatePolicy",
7479
"compute.projects.get",
7580
"compute.subnetworks.get",
7681
"compute.subnetworks.getIamPolicy",
7782
"compute.subnetworks.setIamPolicy",
83+
# Firewall Management
7884
"compute.firewalls.get",
7985
"compute.firewalls.create",
86+
# Private Service Connect (required if using PSC)
87+
"compute.forwardingRules.get",
88+
"compute.forwardingRules.list",
89+
# Customer-Managed Keys (required if using CMK)
90+
# Uncomment these if you plan to use customer-managed encryption keys:
91+
# "cloudkms.cryptoKeys.getIamPolicy",
92+
# "cloudkms.cryptoKeys.setIamPolicy",
8093
]
8194
}
8295

0 commit comments

Comments
 (0)