gsutil make bucket command [gsutil mb] is not working

K M Rakibul Islam picture K M Rakibul Islam · Jun 16, 2014 · Viewed 9.6k times · Source

I am trying to create a bucket using gsutil mb command:

gsutil mb -c DRA -l US-CENTRAL1 gs://some-bucket-to-my-gs

But I am getting this error message:

Creating gs://some-bucket-to-my-gs/...
BadRequestException: 400 Invalid argument.

I am following the documentation from here

What is the reason for this type of error?

Answer

martins picture martins · May 26, 2019

I got the same error. I was because I used the wrong location. The location parameter expects a region without specifying witch zone.

Eg.

sutil mb -p ${TF_ADMIN} -l europe-west1-b  gs://${TF_ADMIN}

Should have been

sutil mb -p ${TF_ADMIN} -l europe-west1  gs://${TF_ADMIN}