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)
| Name | Type | Description | Default | Required |
|---|---|---|---|---|
project_id | string | GCP project ID | — | yes |
name | string | Instance name | — | yes |
region | string | GCP region | — | yes |
db_password | string | Database user password | — | yes |
tier | string | Machine type tier | db-custom-2-7680 | no |
availability_type | string | HA mode (REGIONAL or ZONAL) | REGIONAL | no |
network_id | string | VPC for private IP | null | no |
deletion_protection | bool | Enable deletion protection | true | no |
Outputs (4)
| Name | Description |
|---|---|
instance_name | Name of the instance |
connection_name | Connection name for Cloud SQL Proxy |
private_ip_address | Private IP address |
database_name | Name of the default database |