Search code examples
google-cloud-platformgoogle-app-enginegoogle-cloud-storagegcloud

gcloud app deploy complains about missing staging bucket


I've been used since months or years to delete staging and artifacts buckets after gcloud app deploy command to save on billing costs. These temporary files rest in there forever and I get billed for it.

It always worked until this morning when I got this error:

ERROR: (gcloud.app.deploy) B instance [staging.my-proj-id.appspot.com] not found: The specified bucket does not exist.

I tried to recreate the bucket but I'm not allowed since I'm supposed to prove ownership of the staging.my-proj-id.appspot.com domain — which I have not.

AccessDeniedException: 403 You must verify site or domain ownership

I'm stuck and I have important changes to deploy


Solution

  • I fixed this running this command:

    gcloud beta app repair
    

    I got this direction trying to indicate my own staging bucket with

    gcloud app deploy --bucket=gs://my-own-staging-bucket
    

    like suggested in this answer which returned:

    ERROR: (gcloud.app.deploy) Error Response: [5] Staging bucket staging.my-proj-id.appspot.com is not available. Please refer to https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps/repair to repair your app.