This page describes how to delete an AlloyDB cluster.
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
Console
- In the Google Cloud console, go to the Clusters page.
- Click a cluster in the Resource Name column.
- In the Overview page of your cluster, click Delete cluster .
- In the Delete cluster dialog that appears, enter your cluster ID.
- Click Delete .
You can't delete an AlloyDB cluster that contains any instances using the Google Cloud console.
To override this default behavior, use the gcloud CLI to specify the --force
option
in the clusters delete
command.
gcloud
To use the gcloud CLI, you can install and initialize the Google Cloud CLI, or you can use Cloud Shell .
Use the clusters delete
command to delete a cluster.
gcloud alloydb clusters delete CLUSTER_ID \ --region= REGION_ID \ --project= PROJECT_ID
- CLUSTER_ID : The ID of the cluster.
- REGION_ID : The region where the cluster is placed.
- PROJECT_ID : The ID of the project where the cluster is placed.
Deleting a cluster that contains instances
Attempts to delete an AlloyDB cluster that contains any
instances will fail. To override this behavior, specify the --force
option in the clusters delete
command to
direct AlloyDB to delete all instances in the cluster and then
delete the cluster itself; for example:
gcloud alloydb clusters delete CLUSTER_ID \ --force \ --region= REGION_ID \ --project= PROJECT_ID

