Archive for the ‘google cloud’ Category

Google Bucket: BadRequestException: 400 Unknown project id

May 11, 2019

Hope following will be usefull for other beginners out there.

While trying several sample projects and services of Google Cloud, it was the round for Cloud Storage Bucket, so went for creating a bucket.

C:\Program Files (x86)\Google\Cloud SDK>gsutil mb gs://helloworld-123456-bucket
Creating gs://helloworld-123456-bucket/...
BadRequestException: 400 Unknown project id: helloworld-abc123-bucket

The output refers to a very old project id (helloworld-abc123-bucket), furthermore that prject was deleted long time ago.

After a quick investigation this command helped understanding was going on:

C:\Program Files (x86)\Google\Cloud SDK>gcloud config list
[core]
account = some.user@gmail.com
disable_usage_reporting = False
project = helloworld-abc123-bucket

Your active configuration is: [default]

C:\Program Files (x86)\Google\Cloud SDK>

The “project” still had the old one, then switch the project was the next step.

C:\Program Files (x86)\Google\Cloud SDK>gcloud config set project helloworld-123456-bucket
Updated property [core/project].

C:\Program Files (x86)\Google\Cloud SDK>gcloud config list
[core]
account = some.user@gmail.com
disable_usage_reporting = False
project = helloworld-123456-bucket

Your active configuration is: [default]

C:\Program Files (x86)\Google\Cloud SDK>

Time to create the bucket

C:\Program Files (x86)\Google\Cloud SDK>gsutil mb gs://helloworld-123456-bucket
Creating gs://helloworld-123456-bucket/...
AccessDeniedException: 403 The project to be billed is associated with an absent billing account.
C:\Program Files (x86)\Google\Cloud SDK>

Well … bissing is another chapter 🙂

more info BadRequestException: 400 Unknown project id