Before deleting a cluster
Disable deletion protection for the cluster if it is enabled.
The cluster ID is required to restore a deleted cluster from a backup.
After you delete a database cluster, its backups are kept for 7 days for recovery purposes.
Deleting the cluster
- Open the folder page in the management console.
- Select Managed Service for PostgreSQL.
- Click for the necessary cluster and select Delete.
If you don't have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the
To delete a cluster, run the command:
yc managed-postgresql cluster delete <cluster name or ID>
You can query the cluster ID and name with a list of clusters in the folder.
With Terraform, you can quickly create a cloud infrastructure in Yandex Cloud and manage it by configuration files. They store the infrastructure description in HashiCorp Configuration Language (HCL). Terraform and its providers are distributed under the Mozilla Public License.
If you change the configuration files, Terraform automatically determines which part of your configuration is already deployed and what should be added or removed.
Read more about Terraform in the documentation.
To delete a cluster created using Terraform:
In the command line, go to the folder with the current Terraform configuration file with an infrastructure plan.
Delete resources using the command:
Terraform will delete all the resources that you created using it, such as clusters, networks, subnets, and VMs.
Confirm the deletion of resources.