Failed to delete instance-group-1: Request in scope 'scope_type: ZONE scope_name: “us-central1” ’ sent to api endpoint in ‘[scope_type: REGION scope_name: “us-central1” ]’.
I have waited for 30 minutes and retried and still get the same issue. I have removed the backend service already. I was able to modify the instance group to have min/max equal to zero so now there are no VMs running but still don’t know why I can’t delele the instance group
The error message “Request in scope 'scope_type: ZONE scope_name: "us-central1” ’ sent to api endpoint in ‘[scope_type: REGION scope_name: "us-central1"]’" means you’re trying to delete a zonal instance group using an API endpoint that expects a regional scope.
Understanding the Error
Zonal vs. Regional:
Zonal Resources - Instance groups (and the VMs they manage) can be created within a specific zone (e.g., us-central1-a).
Regional Resources - Some resources (like load balancers and health checks) are configured on a regional level (e.g., us-central1).
Check here the documentation to see the specific differences between zonal and regional.
Troubleshooting Steps and Solution
1. Identify the Exact Zone
Using gcloud CLI:
gcloud compute instance-groups list --filter="name=instance-group-1"
This command will list all instance groups, look for the LOCATION column in the output to find the specific zone where instance-group-1 is located. Let’s say it’s in us-central1-c for this example.
Using Google Cloud Console:
Go to the “Compute Engine” → “Instance groups” → “Overview” page.
Find your instance group named instance-group-1.
Look at the “Location” column. It will specify the exact zone.
For your reference, you may refer to these relevant documentations:
Delete Managed Instance Group - This is the official gcloud command documentation which specifies the --zone flag, the command requires.
Instance Groups Overview - Provides more detailed information about how instance groups and zones work.
Resource hierarchy - Details the concept of scopes for google cloud resources.
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.