Prerequisites
- Google Cloud CLI (gcloud) installed and configured
- A GCP project with appropriate admin access to create roles and service accounts
- Billing account access (for cost-related permissions)
Step 1: Get Your Project ID
Run the following command to get your GCP project ID:Step 2: Create a Custom Role
Save the following role definition to a file calledcustom-role.yaml:
Step 3: Create a Service Account
Create a new service account for the Doctor Droid integration:Step 4: Assign the Custom Role to the Service Account
Bind the custom role to the service account:Step 5: Create and Download Service Account Key
Generate a JSON key file for the service account:drdroid-key.json file containing the service account credentials.
Important: Store this key securely. It provides access to your GCP resources.
Step 6: Configure in Doctor Droid Platform
- Navigate to the Integrations tab in the Doctor Droid platform
- Click Add New Integration
- Select Google Cloud and click Connect
- Fill in the following credentials:
| Field | Description | Example |
|---|---|---|
| Integration Name | A descriptive name to identify this integration | Production GCP |
| Project ID | Your GCP Project ID (found in the JSON key file) | my-project-123456 |
| Service Account JSON | The entire contents of the JSON key file | {"type": "service_account", ...} |
- Click Test Connection to verify the setup
- Click Save to complete the integration
Permissions Overview
The custom role provides read-only access to:| Category | Resources |
|---|---|
| Compute Engine | Instances, Disks, Networks, Subnetworks, Firewalls, Addresses |
| GKE | Clusters, Nodes, Pods, Services |
| Cloud SQL | Instances, Databases |
| Cloud Storage | Buckets, Objects |
| Cloud Monitoring | Metrics, Dashboards, Alert Policies, Uptime Checks |
| Cloud Logging | Log Entries, Log Metrics, Sinks |
| IAM | Service Accounts, Roles, IAM Policies |
| Billing & Cost | Billing Accounts, Budgets |
| Cloud Asset Inventory | Resource search, IAM policy search |
| Recommender | Machine type recommendations, Idle resource recommendations |
| Resource Manager | Projects, Folders, Organizations |
Organization-Level Access (Optional)
To grant access across multiple projects in an organization, create the role at the organization level:Troubleshooting
Role Creation Failed
Ensure you haveroles/iam.roleAdmin or roles/owner permission on the project. You may need to enable the IAM API:
Service Account Creation Failed
Verify that:- The IAM API is enabled
- You have
iam.serviceAccounts.createpermission - The service account name is unique
Permission Denied Errors
Some permissions require specific APIs to be enabled:Integration Test Failed
Check that:- The Project ID is correct
- The JSON key file contents are complete and properly formatted
- The service account has the custom role assigned
- Required APIs are enabled in the project
Billing Permissions Not Working
Billing permissions require the service account to be added to the billing account:- Go to Billing Console
- Select your billing account
- Click Account Management
- Add the service account email with Billing Account Viewer role

