Unable to create PostGRE SQL db with Private IP

The error message you’re receiving indicates a mismatch between the IP range you’ve set and what the system is expecting or looking for.

Here’s a step-by-step approach to address the issue:

  1. Verify the Allocated IP Range:

    • Navigate to the VPC networks page in the Google Cloud console.
    • Choose the VPC network you’re working with.
    • Go to the “Private service connection” tab and then the “Allocated IP ranges for services” tab.
    • Ensure that the IP range “my-db-ip-range” is listed here. If not, you’ll need to allocate it.
  2. Establish a Private Connection:

    • Still under the “Private service connection” tab, switch to the “Private connections to services” tab.
    • Create a connection between your VPC network and the Cloud SQL service. Ensure that the allocated IP range is associated with this connection.
  3. Check for Naming Discrepancies:

    • It’s possible that there might be a naming discrepancy causing the system to look for “hfc-xecm-ip-range” instead of “my-db-ip-range”. Double-check any scripts, configurations, or templates you might have used during the setup.
  4. Console Glitch:

    • Sometimes, caching or UI glitches can cause unexpected behaviors in cloud consoles. Consider logging out, clearing your browser cache, and logging back in. Alternatively, try using a different browser or the gcloud command-line tool to set up the private IP.
  5. Revisit Documentation:

  6. Contact Support:

    • If you’ve verified all the above and are still facing the issue, it might be a good idea to reach out to Google Cloud support for further assistance.