Troubleshooting CloudSQL Instance Creation
If the creation of a CloudSQL instance fails with an unspecified error, it might be due to lack of necessary permissions. It is possible to find the error code in Cloud Logging in the GCP project where the CloudSQL instantiation failed, however these logs do not offer detailed error information either.
A permission-related error that we have alread encountered had the following error code:
status: {
code: 13
}
This error is caused by insufficient permissions of the Service Networking Service Agent service account belonging to the project that will host the CloudSQL instance, in the project that hosts the shared VPC Network.
To solve this issue, first find the Service Networking Service Agent service account belonging to the project that will host the CloudSQL instance.
It will conform to the following format:
service-<project-number>@service-networking.iam.gserviceaccount.com
The error above is described in the CloudSQL Instance creation documentation. In case this occurs, a developer or a tech lead might contact us to fix the missing permissions. To do that, follow these steps:
- Switch to the project that hosts the shared VPC,
ems-vpchost-stagingfor stagingems-vpchost-productionfor production. - Under IAM & Admin / IAM, grant the
Compute Network Adminrole to the Service Networking Service Agent of the project that will host the CloudSQL instance.