# Cloud SQL private IP: allocated IP range is exhausted / private services access not configured

**Code:** `private IP` · **Category:** Google Cloud / Firebase · **Seen on:** Google Cloud

Creating a private-IP instance fails because the VPC peering range is missing, too small or conflicts.

## Meaning

Reserve an IP range for private services access (`gcloud compute addresses create --purpose=VPC_PEERING --prefix-length=16`) and create the peering (`gcloud services vpc-peerings connect`). Increase or add ranges if full; ensure ranges don't overlap with on-prem or other peerings.

## Common causes

- No private services access configured
- Allocated range too small or used up
- Overlapping ranges
- Peering deleted by mistake
- Org policy blocking peering

## Quick fix

1. Allocate a /16 range and create the VPC peering
2. Add another allocated range if exhausted
3. Resolve overlaps

## Detailed fix by platform

### Shell

1. 

```bash
gcloud compute addresses create google-managed-services --global --purpose=VPC_PEERING --prefix-length=16 --network=NET
gcloud services vpc-peerings connect --service=servicenetworking.googleapis.com --ranges=google-managed-services --network=NET
```


## How to diagnose

1. **Range** — Allocated?
2. **Peering** — Active?
3. **Overlap** — None?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/gcp/cloudsql-private-ip-allocated-range-exhausted)
