Hello,
I am currently running a Cloud SQL (MySQL) instance that was created using VPC peering.
When attempting to create a new SQL instance, I noticed that the peering range associated with the SQL instance has been deleted.
However, while attempting to create a new SQL instance, I noticed that the allocated IP range associated with the existing SQL instance is deleted. There is nothing in the “vpc > private service access > allocated IP ranges for services”.
The console suggests that updating the connection will not affect existing instances (as shown in the attached screenshot), but I need to be absolutely certain that this operation will not disrupt my production database.
I found discussions on Stack Overflow[1] suggesting that the following command [2] resolves this issue. Before proceeding, I need to confirm the following points regarding the impact on my running instance:
-
Data Integrity: Is there any risk of data loss or downtime during this update?
-
IP Persistence: Will the Private IP address of the existing Cloud SQL instance change?
-
Connectivity: Will the existing database IP address remain valid within the re-established peering range, ensuring no internal access/connectivity issues?
If there are any other precautions or “gotchas” I should be aware of before running this command, please let me know.
[1] https://stackoverflow.com/questions/55135559/unable-to-recreate-private-service-access-on-gcp
[2] gcloud services vpc-peerings update --service=servicenetworking.googleapis.com --ranges=[private_connection_range_name] --network=[vpc_network_name] --project=[project_name] --force
