pgAdmin 4 has added functionality to deploy cloud instances for PostgreSQL on AWS, Azure and BigAnimal. pgAdmin version 7.0 has introduced the new functionality for deploying a Google Cloud SQL PostgreSQL instance from pgAdmin. To launch a Google Cloud SQL PostgreSQL instance, the prerequisite is to create and download a client secret file containing the client ID, client secret, and other OAuth 2.0 parameters for google authentication. This feature enables you to quickly deploy the PostgreSQL instance to the desired region on Google Cloud, with custom configuration, and connect to it with pgAdmin.
Creating client secrets
- Go to the Google Cloud Platform Console.
- From the projects list, select a project or create a new one.
- If the APIs & services page isn't already open, open the console left side menu and select APIs & services.
- On the left, click Credentials.
- Click Create Credentials, then select OAuth client ID.
- If this is your first time creating a client ID, you can also configure your consent screen by clicking Consent Screen.
- Click Create client ID.
- Download client secret by clicking the download button.
Deploying Google Cloud SQL PostgreSQL Instance
To deploy the PostgreSQL server on the Google Cloud SQL, open ‘Deploy Cloud Instance..’ from the server group's Register contextual menu or select a server group from the object menu and navigate to Register > Deploy Cloud Instance… option.
On the Deploy Cloud Instance wizard, select the Google Cloud SQL cloud provider and move to the next step.
The Credentials step requires a client secret file to initiate google authentication. Select client secret json file downloaded previously & click on button to authenticate yourself to Google. Clicking the button will open a popup to enter Google credentials.