An internal error occurred while creating a Google Cloud Storage bucket

google-cloud-storagegoogle-compute-engine

I have started my google cloud setup today.
Tried to follow instructions in interactive tutorial.
Setting up my First App that uses Node.js worked fine. But deploying app to Compute Engine failed with following error.

ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred while creating a Google Cloud Storage bucket.

I have added my account as Admin to 3 Storage buckets I found with my account.

Best Answer

Try by setting this configuration parameter first:

gcloud config set app/use_deprecated_preparation True

as proposed in Google's Public Issue Tracker

If that doesn't work, can you provide the link to the tutorial you followed, so that the error can be reproduced?

Usually, it's a matter of setting the right permissions (as you pointed out regarding your account), but when you deploy your app to a Compute Engine instance, that instance will have to communicate with the Cloud Storage Buckets. This means that the Compute Engine Service Account needs to have the proper IAM permissions to access the Cloud Storage.

You can also create a new service account that your app can use to access specific resources in your Google Cloud Project.

Check your IAM and/or service accounts to see the available accounts, roles and permissions.