Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Error while deleting VPC Connector

Dear Google Team,

I'm trying to manually delete a VPC Connector but got error, please advise:

Project: iguru-vpc-dev

VPC Connector: projects/iguru-vpc-dev/locations/asia-northeast1/connectors/iguru-ssi-vpc-connector

The error log shows as below:

{
insertId: "xv4w29cf2c"
logName: "projects/iguru-vpc-dev/logs/cloudaudit.googleapis.com%2Factivity"
operation: {
id: "operation-1702980258154-60cd9fd58c983-6cd03b00-7101c508"
last: true
producer: "deploymentmanager.googleapis.com"
}
protoPayload: {
@type: "type.googleapis.com/google.cloud.audit.AuditLog"
authenticationInfo: {
principalEmail: "service-71165010306@gcp-sa-vpcaccess.iam.gserviceaccount.com"
}
methodName: "v2.deploymentmanager.deployments.delete"
request: {
@type: "type.googleapis.com/deploymentmanager.deployments.delete"
}
requestMetadata: {
callerIp: "private"
callerSuppliedUserAgent: "Tesseract Google-API-Java-Client/1.35.2 Google-HTTP-Java-Client/unknown-version (gzip)"
destinationAttributes: {
}
requestAttributes: {
}}
resourceName: "projects/iguru-vpc-dev/global/deployments/aet-asianortheast1-iguru--ssi--vpc--connector"
serviceName: "deploymentmanager.googleapis.com"
status: {
code: 3
message: "BAD_REQUEST,BAD_REQUEST,BAD_REQUEST,BAD_REQUEST,BAD_REQUEST,BAD_REQUEST,BAD_REQUEST,BAD_REQUEST"
}}
receiveTimestamp: "2023-12-19T10:04:28.504004676Z"
resource: {2}
severity: "ERROR"
timestamp: "2023-12-19T10:04:27.479128Z"
}

1 2 748
2 REPLIES 2

Hello @longlh_ssi!

Welcome to the Google Cloud Community!

You can do the following troubleshooting options:

  1. You can run this gcloud command in the CLI. This deletes a new VPC Access Connector with the given name. Though, a reason it could fail is that: an instance with the same name already exists or you account does not have the permission to delete instances.
  2. Take a look at this forum. A reason that you can't delete your VPC Connector is because it's being used by a resource(Compute Instance) in your project. Check the Compute Instance section then stop all running instance then delete the VPC.
  3. If the above options don't work, you can contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!

Thank you for the recommendations, Marramirez.

We figured out that Compute Engine API had accidentally disabled which caused the issue. Enable it then we can delete VPC Connector as normal.