Cloud SQL Storage (GCP)
CostLens flags Cloud SQL instances with auto-resize on and far more allocated disk than used, so you can cap growth and right-size at migration.
CostLens flags Cloud SQL instances with far more allocated disk than used, while automatic storage increase is enabled. Cloud SQL disks grow automatically and never shrink, so an over-allocated instance keeps paying for storage it doesn't use.
Disks can't shrink
This is advisory — you can't reclaim allocated Cloud SQL disk in place. The value is capping runaway auto-growth and right-sizing when you next migrate/re-create the instance.
How it works
Instances are enumerated
CostLens lists Cloud SQL instances via the Admin API and reads each instance's allocated disk and auto-resize setting.
Usage is measured
Used bytes come from the Cloud Monitoring disk/bytes_used gauge; instances under ~40% used with auto-resize on are flagged.
Savings are estimated
A preventive estimate on the over-allocated GB (auto-growth avoided), not an in-place reclaim.
What to do
- Review why the disk is over-allocated (a one-off spike, a since-deleted dataset).
- Cap automatic storage increase or set a sensible limit, and right-size the disk when you next re-create/migrate the instance.
Severity levels
| Severity | Estimated monthly savings |
|---|---|
| critical | >$500 |
| high | $100–$500 |
| medium | $20–$100 |
| low | <$20 |
Required permissions
- Detect: Cloud SQL read + Monitoring Viewer — see GCP Accounts. Without Monitoring read this check produces nothing.
Limitations
- Savings are preventive (disks can't shrink) — treat the figure as a ranking signal.
- Instances with no usage metric are skipped.