How to create Cloud SQL instance for the PostgreSQL database in Google Cloud Platform

Chirag Patel
DSC DDU
Published in
3 min readMar 5, 2020

--

In this article, I will show you how to create Cloud SQL instance for the PostgreSQL database in Google Cloud Platform. PostgreSQL is a SQL database. GCP provides SaaS(Software as a Service) for creating a database instance using a few clicks. You don’t have to take care of the server Maintenance, Availability or Scalability of the database.

Prerequisites

  1. You should have some basic knowledge about Cloud Computing services like IaaS, PaaS, SaaS, etc.
  2. I hope you have GCP credit to access the portal. If you don’t have then you can try free tier using this link.

Different Way to create a PostgreSQL Instance

  1. gcloud Command Line
  2. REST API
  3. Cloud Console

For this article, I will use the Cloud Console to create an instance.

  1. Go to the Google Cloud Console. Click on the left-hand panel top Menu->SQL(storage section).

2. Click on the Create Instance.

3. There are three different database engines available.

  • MySQL
  • PostgreSQL
  • SQL Server

Click on PostgreSQL database Engine for this article. Based on your requirements you can choose another option.

4. Fill up the required detail for PostgreSQL instance.

You can enter suitable details for Instance id, Password, Database Version and Location which is nearest to your users. For this article, I filled the detail which is shown in the below image. There are other configurations also as Connectivity, Machine type and storage, Flag, etc. For normal instance skip these configuration options. Click on the Create button at the left-bottom of the page.

Wait for a few minutes until the instance is being created. When you see the green mark on the instance then click on that. It will show all the metadata related to the PostgreSQL instance.

There are various options available on the top bar like Edit, Stop, Delete, etc. In the left-hand panel also other options are available like Connections, Users, Databases, etc. For more information follow this link of the official documentation of the Google Cloud Platform.

Congratulation, you have successfully created PostgreSQL Instance on the Google Cloud Platform of Software as a Service.

You can comment if you faced any issues and share if you liked it.

--

--

Chirag Patel
DSC DDU

DevOps Engineer | Cloud Enthusiasm | 1x GCP | AWS | 2x Azure | Kubernetes | Docker | Jenkins | Terraform