I want to connect cloud sql instance having a private ip to my sql workbench.
Is use of virtual machine mandatory..?
developers should have least permission so they cannot delete any infrastructure.
how to control them by using IAM or is there any other way to give access please let me know.
Hi @Ajaysingh1,
Thank you for reaching out.
According to this documentation,
There are many ways to connect to a Cloud SQL instance with a private IP address, depending on where the source is located. The key factor is that the source machine must be in the same VPC network as the Cloud SQL instance. If the source is not in Google Cloud or not in the same Google Cloud project, then you have to configure connectivity differently than we show here.
In this quickstart, perform the following action to configure connectivity through the most direct path. The source and target are in the same Google Cloud project and in the same VPC network. We create a Cloud SQL instance with a private IP address (the target) and a Compute Engine VM (the source). We use the VM to install and use the tools required to connect from the VM to the Cloud SQL instance.
Private IP access requires VPC peering, private services access, imported custom routes using Google managed project. With shared VPC, the scenario/setup can be more complex. Connection to the SQL instance is only allowed from a GCP resource within the same VPC network and same region.
You can also check this documentation on how to configure a Cloud SQL instance to use private IP.