Search code examples
google-cloud-platformgoogle-cloud-functionsgcloud

How delete not initialized google function?


How i can delete this function from gcloud API, or google console. I get this error after my try create function, and now I can't delete it. For create function I used google console. Error message say me that not initialize region. But in screen i see region us-central1. My try delete this function return unknown error. Maybe anybody knows another way?

enter image description here


Solution

  • First, try to delete in CLI/SDK/Cloud Shell using gcloud command :

    • gcloud functions delete function-name

    If you still encountered the error, the possible workaround I suggest, try to disable and enable again the Cloud Function API then redeploy, if it is successful then delete or continue to use it.

    Please note you cannot disable the Cloud Function API, if there's a working Cloud Function deployed. You can disable and enable the Cloud Function API by doing the gcloud command below:

    • gcloud services disable cloudfunctions.googleapis.com
    • gcloud services enable cloudfunctions.googleapis.com

    If the workaround doesn't work, I'll recommend to contact the Google Cloud Platform Support or create a Public Tracker Issue to inspect the action id in the error.

    UPDATE :

    Please visit the Google Cloud dashboard see the yellow banner at the top, it said that "10% of Cloud Functions deployments are failing in us-central1". According to the error of Cloud Function and location, it looks like you are one of the affected users. If there is no yellow banner, it should be completely fixed.