Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gsutil make bucket command [gsutil mb] is not working

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?

like image 522
K M Rakibul Islam Avatar asked Jun 16 '14 17:06

K M Rakibul Islam


People also ask

What is gsutil MB command?

gsutil is a Python application that lets you access Cloud Storage from the command line. The gsutil tool has commands such as mb and cp to perform operations. Each command has a set of options that are used to customize settings further.

How do I run a gsutil command in Python?

After installing and configuring Google Cloud SDK gsutil command can be run by simply typing its name and the argument(-s) using Windows cmd.


1 Answers

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}
like image 92
martins Avatar answered Oct 03 '22 00:10

martins