This page describes how to edit an existing AlloyDB for PostgreSQL instance.
After you create an instance, you can edit it while it's running to change its settings. For information about how instance settings and edits can impact an instance, see View cluster and instance settings.
Before you begin
- The Google Cloud project you are using must have been enabled to access AlloyDB.
- You must have one of these IAM roles in the Google Cloud project you are using:
roles/alloydb.admin
(the AlloyDB Admin predefined IAM role)roles/owner
(the Owner basic IAM role)roles/editor
(the Editor basic IAM role)
If you don't have any of these roles, contact your Organization Administrator to request access.
Procedure
Most edits can be applied to an instance only when it's running.
Console
- In the Google Cloud console, go to the Clusters page.
- In the Resource Name column, click a cluster.
- On the Overview page, go to the Instances in your cluster section and find the instance that you want to edit. In the Instance actions menu, click Edit.
- Update any editable settings for your instance and click Update Instance.
gcloud
To use the gcloud CLI, you can install and initialize the Google Cloud CLI, or you can use Cloud Shell.
To edit an instance, use the
instances update
command along with the configuration that you want to update, as shown in the
following example:
gcloud instances update INSTANCE_ID \ --region=REGION_ID \ --cluster=CLUSTER_ID \
- INSTANCE_ID: The ID of the instance.
- REGION_ID: The region where the instance is placed.
- CLUSTER_ID: The ID of the cluster where the instance is placed.
The following example command shows how to update the number of nodes in the read pool:
gcloud alloydb instances update my-read-instance \ --cluster=my-cluster \ --region=us-central1 \ --read-pool-node-count=3
To learn more about instance configuration flags, see gcloud alloydb instances update.