Can't delete instance group

I get this error

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

Hi @SanDiegoBoy ,

Welcome to Google Cloud Community!

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.

2. Use the Correct Zone Scope When Deleting:

  • Using gcloud CLI
    Now that you know the zone (e.g., us-central1-c), use the --zone flag:

    gcloud compute instance-groups managed delete instance-group-1 --zone=us-central1-c
    

For your reference, you may refer to these relevant documentations:

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.

Thanks, my instance group was regional

NAME: instance-group-1
LOCATION: us-central1
SCOPE: region

so I did : gcloud compute instance-groups managed delete instance-group-1 --region=us-central1

Worked. FYI, I created directly on the UI and tried to delete it on the UI. That didn’t work - I thought the UI would apply the correct command.

1 Like