All Modules
GCPDatabase

Cloud SQL

PostgreSQL with HA, private networking, query insights, and automated backups

Usage

module "cloud_sql" {
  source = "github.com/fencepencil/gcp-modules//cloud-sql"

  project_id = "<project_id>"
  name = "<name>"
  region = "<region>"
  db_password = "<db_password>"

  tags = var.tags
}

Inputs (8)

NameTypeDescriptionDefaultRequired
project_idstringGCP project IDyes
namestringInstance nameyes
regionstringGCP regionyes
db_passwordstringDatabase user passwordyes
tierstringMachine type tierdb-custom-2-7680no
availability_typestringHA mode (REGIONAL or ZONAL)REGIONALno
network_idstringVPC for private IPnullno
deletion_protectionboolEnable deletion protectiontrueno

Outputs (4)

NameDescription
instance_nameName of the instance
connection_nameConnection name for Cloud SQL Proxy
private_ip_addressPrivate IP address
database_nameName of the default database

More GCP Modules

Browse our full library of GCP infrastructure modules.

View all GCP modules