Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

Bucket Editing

Why we can’t modify bucket from Multi-regional to regional.

2 Answers

Hello satishsushe,

That’s actually a good question. The first thing to keep in mind here is that the following 3 things are permanently set when you create a bucket and can’t be changed: name, geographic location, and project.  With that in mind, the next thing to understand is that regional or multi-regional setting of the bucket is part of the specification of its geographic location. So, it’s not so much not being able to change from multi-region to regional but more so the geographic location setting itself can’t be changed.

Now, with all of that in mind, there is a way to "change" a bucket from  multi-regional to regional.  In order to do so it would involve a multi-step process. First, you would need to create a temporary bucket as sort of a staging area. Next you would need to copy the contents of the existing multi-regional bucket to the newly created staging bucket. Then, delete the original multi-regional bucket. This is important since bucket names must be unique and you must free the bucket name to be reused. Finally, create a new regional bucket with the original name of the now deleted bucket , copy the contents from the staging bucket to the new regional bucket, and then delete the staging bucket. You will have then effectively changed the bucket from multi-regional to regional.

Please review the following links for more details on locations and the process described above:

https://cloud.google.com/storage/docs/locations

https://cloud.google.com/storage/docs/moving-buckets

Mattias Andersson

Excellent response! 😃👍

Just curious.
Is the bucket Name ‘the’ unique identifier, or is it just an attribute that must be globally unique ?
This is relevant if you have automation referring to the bucket. Will the automation refer to the Name or to a GUID or other ID which would have changed when you recreated the bucket ?

Rusty

new to GCP

Mattias Andersson

Yes, Russell–the name is the bucket’s key. And you can reuse it once it’s been freed up, too. 🙂 See this for more info: https://cloud.google.com/storage/docs/naming#requirements

Russell

thank you

Mattias Andersson

Np 🙂

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?