GCS or Google Cloud Storage is a simple yet very powerful object storage bucket from Google, and users can use this service inside GCP or Google Cloud Platform. It's a highly scalable, robust, durable, consistent, and highly available storage solution by google. Google uses this same storage for there own object storage.
In this article, I will show you how to create a GCP Cloud storage bucket.
For this, the first step is to write this https://cloud.google.com/ URL inside your browser. This screen will come, as shown below. I already registered with GCP, that's why the console button is showing up right corner. If you do not have a GCP account, then create it and if already have it, then click console as shown below.
After login, you will see this GCP home screen for the first-time. It will look like this, as shown below
Let's work on creating a Google Cloud Storage (GCS) now. Click the burger bar on the left side top and search 'Storage.' Hover your mouse over storage and click on the browser, as shown in the image below.
To create a new bucket, click on create the bucket, as shown in the image below.
After clicking the button, it will take you to a page where you need to fill all the requirements, what you need for your bucket.
Now let me fill all the information that we need in our test bucket. The first thing is we need a Globally Unique name for our bucket, and this name will be a permanent name, and you can't change this in the future. If you want to change the name, then you need to create a new bucket and copy the whole data from your current bucket and delete the existing bucket. After writing the unique name, please click continue.
The next step is to choose where you want to store your bucket. You have three geographic placement choices, and you can select any one of them. This selection will help you in deciding the cost and the performance, availability & placement of your data.
Three Choices are as follow:
Region: Lowest latency within a single region.
Dual Region: High Availability and low latency across two regions.
Multi-Region: Highest Availability across the largest areas.
We just need one bucket for our to terraform setup; that's why we picked the Region, the lowest latency one with a single region in us-central1(Iowa).
Next, you need to choose the storage class for your data. It's very important because, based on this selection, you will save a lot of money and how important the speed of data retrieval for you.
There are four types of storage plans in the GCP storage class.
Standard: This type of storage is best for short-term and frequently accessed data.
Nearline: This type of storage is best for taking backups and data accessed for less than a month.
Coldline: This type of storage is best for data recovery and in which you need to access that data once a quarter.
Archive: This type of storage is best for long-term preservation, and in which you need to access that data once a year.
We need this storage to access frequently; that's why we selected standard storage. Click continue after selecting standard.
Now we need to choose how to give control access to objects (Access to the budgets. There are two types of access controls GCP provides, as shown below.
Fine-grained Access Control: Giving specific access to particular individual objects by using Object-level permissions (ACLs) in
Uniform Access Control: By using this UAC, it ensures to provide uniform access to all the objects in the bucket by using only bucket-level permission from IAM. This option becomes permanent after 90 days.
I am using Fine-grained Access Control for this bucket. Click continue after selecting this option.
The last option is how you want to set up the encryption on your bucket. There are two options as shown below
Google-managed key: You don't need to do anything in it. (No configuration required)
Customer-managed key: Managed via Google key management services.
Now comes the retention policy for our bucket. Retention policy means you gave instructions to google that my bucket objects should be protected from accidental deletion or modifications after they're uploaded. The retention policy is a very important step for saving your data from accidental deletion if you have a big team. Check how you setup retention policy, as shown below in the image.
If you choose to turn on the retention policy, then It will look like this, as shown in the image below.
The last step before clicking create is to add the label. I always create labels; it helps you a lot to find out your created infrastructure when you are working in a large environment.
Now click create.
After a few mins, On the Google cloud storage dashboard, you will see your bucket.
In the next topic, I will discuss the same bucket, when you open the bucket, how many options you have inside the google cloud storage bucket, and how to create a folder inside that bucket. So, stay tuned.