Unable to disable Compute Engine and Notebooks API on GCP

46 views Asked by At

I have been trying to disable the Compute Engine API and Notebook API, but have no luck. Here’s what I have tried so far:

  • via the API services
  • via gcloud commands
    gcloud services disable compute.googleapis.com --force
    

Neither work. I got the attached error when I tried using the API service: enter image description here

All the resources have been deleted both in the Compute Engine and Notebooks, so I am not sure why it is still holding it up.

Anyone experienced this before?

1

There are 1 answers

2
AndreuElLios On

I've found some interesting information related to your issue. It has to do with permissions and dependent services.

Regarding permissions, I think that's not the issue, as no IAM error is shown. However, it's worth double checking you have enough permissions for using Service Usage here.

Next, checking the public documentation, I noticed the blue note stating the following:

In v1 of the API, if you attempt to disable a service that other enabled services depend on, the call will fail. The API call to disable the service will result in an error message

Therefore, my current hypothesis is that there are other dependent services that prevent the API from being disabled.

As I saw that you are using the --force command, let's get straight to the point. You can set the disable_dependent_services parameter on the services.disable request to true.

Hope that helped!