Not trying to rant about GCP, but to sum up, you need to do a ton of somehow complex steps just to get a simple thing up and running. It’s frustrating though.
As I was trying to enable a private service access connection between two projects including a Shared VPC configuration, I received the following error message:
Update private connection "servicenetworking-googleapis-com"
devcoops-network
Please set force field to true to remove any previously allocated range. Help Token: <redacted>
Prerequisites
- GCP account
- gcloud CLI
Solution
Authenticate via the gcloud CLI and run the following command:
gcloud services vpc-peerings update \
--service=servicenetworking.googleapis.com \
--ranges=[ private-connection-service-allocated-ip-range-name ] \
--network=[ vpc-network-name ] \
--project=[ project-id ] \
--force
Conclusion
Tried everything and nothing works? Let me know in the comment section below. On a side note, follow our official channel on Telegram.