agentleFS
ai-enhanced-engineerai-enhanced-engineer/aiee-skills/skills/gcp-cloudsql-infrastructure/SKILL.md

gcp-cloudsql-infrastructure

Skill4 starsChanged 5 months agoMITView on GitHub

Cloud SQL PostgreSQL infrastructure provisioning and operations. Machine type selection, storage sizing, HA configuration, backup strategies, VPC networking. Use when configuring Cloud SQL instances, planning database capacity, setting up backups, or designing high availability.

The file

Files
SKILL.md

Cloud SQL Infrastructure

Infrastructure-level patterns for Google Cloud SQL PostgreSQL provisioning and operations.

Machine Type Selection

TypevCPURAMCost/moUse Case
db-f1-microShared0.6GB~$16Dev/test only (CPU throttling)
db-g1-smallShared1.7GB~$28Light staging workloads
db-standard-113.75GB~$68Production-like staging
db-standard-227.5GB~$136Small production
db-standard-4415GB~$272Medium production

Selection Heuristics

Concurrent ConnectionsRecommended Tier
<10db-f1-micro (dev only)
10-30db-g1-small
30-100db-standard-1
100-300db-standard-2
300+db-standard-4 or higher

Storage Types

Type$/GB/moIOPSLatencyUse Case
PD_HDD$0.09Lower10-20msCost-sensitive staging
PD_SSD$0.17Higher1-5msProduction, performance testing

PD_HDD runs ~10–20ms latency vs PD_SSD at ~1–5ms — HDD noticeably degrades response time on query-latency-sensitive workloads.

High Availability

ModeDescriptionCostUse When
ZONALSingle zoneBaseStaging, cost-sensitive prod
REGIONALMulti-zone failover+35%Production with SLA requirements

Failover time: 60-120 seconds for REGIONAL HA.

Backup Strategies

EnvironmentRetentionPITRRationale
Staging3 daysNoCost savings, easy to recreate
Production30 daysYesCompliance, disaster recovery

Quick Decision Matrix

ScenarioMachineStorageHAMonthly Cost
Dev/Testdb-f1-micro10GB HDDZONAL~$17
Stagingdb-g1-small20GB HDDZONAL~$30
Prod (small)db-standard-150GB SSDREGIONAL~$110
Prod (medium)db-standard-2100GB SSDREGIONAL~$200

See reference.md for sizing calculations, VPC networking, and Terraform patterns. See examples.md for complete Terraform configurations.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.