Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL
All skills

cloud-sql-basics

Create and connect a Cloud SQL instance, database, and user with gcloud commands.

When to use it

You have a Google Cloud project and need a managed PostgreSQL, MySQL, or SQL Server database but haven't provisioned the instance yet.

For example

You say

Use cloud-sql-basics to create a PostgreSQL instance named orders-db in us-central1, set the postgres password, and create an orders database.

You get
  • gcloud instance create command
  • postgres password set
  • orders database created

How it works

  • Connecting locally requires running the Cloud SQL Auth Proxy alongside psql.
  • Covers editions, high availability, backups, and Terraform as reference material.

Before installing

You need IAM permissions to manage Cloud SQL, such as the Cloud SQL Admin (roles/cloudsql.admin) role.