To manage a database, you can either use an existing instance or add a new instance.
Before You Begin
-
To discover database instances, enable the Cloud SQL Admin and Cloud Resource Manager APIs in the project where service account is hosted.
-
On the GCP VM, under API and Identity Management > Cloud API access scopes, enable the Cloud SQL and Cloud Platform scopes.
-
Your Google account must contain the following permissions to access the Google resources:
Role
Title
Description
Permissions
Lowest Resource
roles/cloudsql.viewer
Cloud SQL Viewer
Provides read-only access of Cloud SQL resource.
cloudsql.backupRuns.get
cloudsql.backupRuns.list
cloudsql.databases.get
cloudsql.databases.list
cloudsql.instances.export
cloudsql.instances.get
cloudsql.instances.list
cloudsql.instances.listServerCas
cloudsql.sslCerts.get
cloudsql.sslCerts.list
cloudsql.users.list
resourcemanager.projects.get
resourcemanager.projects.list
serviceusage.quotas.get
serviceusage.services.get
serviceusage.services.list
Project
roles/alloydb.viewer
Cloud AlloyDB Viewer
Provides read-only access to Cloud AlloyDB all resources.
alloydb.clusters.list
alloydb.instances.list
resourcemanager.projects.get
Project
Procedure
-
From the Command Center navigation pane, go to Protect > Databases.
-
On the Overview page, from the Add instance list, select Cloud database service.
-
On the Add Cloud DB instance page, select Google Cloud Platform, and then click Next.
-
On the Configure Google Cloud database page, select PostgreSQL, and then click Next.
The Configure Google Cloud database - PostgreSQL page appears. For further configuration, see Configure database server running on cloud.
Results
-
The new instance contains a dump-based backup set and a default subclient.
-
When you add an instance, a default database group is automatically created. The default database group includes all the data in the PostgreSQL database. You cannot delete the default database group.