googleapis/mcp-toolbox · error
error creating AlloyDB cluster: %w
Error message
error creating AlloyDB cluster: %w
What it means
Error "error creating AlloyDB cluster: %w" thrown in googleapis/mcp-toolbox.
Source
Thrown at internal/sources/alloydbadmin/alloydbadmin.go:164
NetworkConfig: &alloydbrestapi.NetworkConfig{
Network: fmt.Sprintf("projects/%s/global/networks/%s", project, network),
},
InitialUser: &alloydbrestapi.UserPassword{
User: user,
Password: password,
},
}
service, err := s.getService(ctx, accessToken)
if err != nil {
return nil, err
}
urlString := fmt.Sprintf("projects/%s/locations/%s", project, location)
// The Create API returns a long-running operation.
resp, err := service.Projects.Locations.Clusters.Create(urlString, clusterBody).ClusterId(cluster).Do()
if err != nil {
return nil, fmt.Errorf("error creating AlloyDB cluster: %w", err)
}
return resp, nil
}
func (s *Source) CreateInstance(ctx context.Context, project, location, cluster, instanceID, instanceType, displayName string, nodeCount int, accessToken string) (any, error) {
// Build the request body using the type-safe Instance struct.
instance := &alloydbrestapi.Instance{
InstanceType: instanceType,
NetworkConfig: &alloydbrestapi.InstanceNetworkConfig{
EnablePublicIp: true,
},
DatabaseFlags: map[string]string{
"password.enforce_complexity": "on",
},
}
if displayName != "" {
instance.DisplayName = displayNameView on GitHub (pinned to 8cc6e09de2)
When it happens
Trigger: Thrown at internal/sources/alloydbadmin/alloydbadmin.go:164 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/8edd36ee58ec5bc2.
Report an issue: GitHub.