Deploy PostgreSQL on Google Cloud with Terraform – Cloud SQL Edition

Published: 26 July 2025
on channel: Mike's Cloud Solutions
21,518
375

#PostgreSQL #GCP #Terraform #CloudDatabases #InfrastructureAsCode #Pagila

Deploy PostgreSQL on Google Cloud with Terraform – Cloud SQL Edition

In this video, we walk through deploying PostgreSQL on Google Cloud using Cloud SQL, a fully managed relational database service. You’ll learn how to build a secure, private PostgreSQL environment from the ground up using Terraform.

What You’ll Learn
How to provision a private Cloud SQL PostgreSQL instance with Terraform
Best practices for VPC design, service networking, and DNS
Deploying the Pagila sample database for realistic testing
Connecting with pgweb to explore your data via a web UI
Delaying Cloud SQL creation to avoid VPC peering race conditions

Resources Deployed
Custom VPC and subnet
Private VPC Service Controls for Cloud SQL
Private DNS zone and A record for internal name resolution
PostgreSQL 15 Cloud SQL instance (private IP only)
Ubuntu VM with pgweb for browser-based SQL access
Secure password generation

---

GitHub: https://github.com/mamonaco1973/gcp-p...
README: https://github.com/mamonaco1973/gcp-p...

---

00:00 Introduction
01:51 GCP Diagram
03:20 Prerequisites
03:51 Build the Code
05:29 Build Results
08:24 Demo


On this page of the site you can watch the video online Deploy PostgreSQL on Google Cloud with Terraform – Cloud SQL Edition with a duration of hours minute second in good quality, which was uploaded by the user Mike's Cloud Solutions 26 July 2025, share the link with friends and acquaintances, this video has already been watched 21,518 times on youtube and it was liked by 375 viewers. Enjoy your viewing!