Delete VM instance group "instance-group-cchatty"
The instance_group_manager resource 'projects/windowtrafic/regions/asia-east1/instanceGroupManagers/instance-group-cchatty' is already being used by 'projects/windowtrafic/global/backendServices/backend'
Hello Tina,
Answering your question about deleting the backend service, you may achieve that in the console by accessing the load balancer list and clicking advanced settings. However, the backend service could also be in use by other resources like URL maps, and may throw another similar error. In this case, you may have to delete the resource from the advanced settings menu (some can only be deleted using gcloud commands), or delete the entire load balancer and its resources in one shot (select all check-boxes when the dialogue box appears).
Alternatively, you may use Google Cloud SDK commands like this Stackoverflow discussion. In Cloud Shell, execute this command to delete the backend service (assuming no other service is using it) as follows:
gcloud compute backend-services delete [backend-name] --global
As for deleting the instance group from console, you may try this link, or use this gcloud command as follows:
gcloud compute instance-groups managed delete [instance-group-name] --zone [Zone]
Hello Tina,
When making changes to any project resource from any Compute Engine instance, you need project IAM permissions and not necessarily only local instance (Linux permissions). That said, you need to check if your email account has the permissions first in IAM. Then, if you are an owner or editor (example), and if not authenticated, you need to authenticate using your account.
To list authenticated accounts you may use this command
gcloud auth list
gcloud auth login or gcloud auth login [your email account]
In Cloud Shell though, you should be already authenticated, and if not you may check the above.
Hello Tina,
I am not really sure what other permission you may be missing. Thus, I suggest opening a private issue tracker report. Include in your report your project ID, the complete error message with the [--verbosity=debug] flag, and a screenshot of the [gcloud auth list] command. On the other hand, have you tried from console as I suggested in my past message?
Hello Tina,
After checking the issue tracker, and for the benefit of the community, it seems that you were not executing the commands from the cloudshell prompt, but rather from one of the instances within the instance groups (maybe SSH’d from cloudshell to one of the instances). Furthermore, using the command you entered one of the instance’s name within the group rather than the name of the entire group. Hence, in both cases it threw this error:
ERROR: (gcloud.compute.instance-groups.managed.delete) Could not check if the Managed Instance Group is Autoscaled.
- Insufficient Permission