Delete an instance group
Warning
Deleting an instance group is an operation that cannot be canceled or reversed. You cannot restore a deleted group. Along with the group, you delete the Network Load Balancer target group, instances, and disks.
To delete an instance group:
- Open the folder page in the management console.
- Select Compute Cloud.
- On the left-hand panel, select Instance groups.
- Click
- Confirm the action.
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 --folder-name
or --folder-id
parameter.
-
See the description of the CLI's delete instance group command:
yc compute instance-group delete --help
-
Get a list of instance groups in the default folder:
yc compute instance-group list +----------------------+-----------------------+------+ | ID | NAME | SIZE | +----------------------+-----------------------+------+ | amc65sbgfqeqf00m02sc | first-instance-group | 2 | +----------------------+-----------------------+------+
-
Select the group
ID
orNAME
(for example,first-instance-group
). -
Delete the instance group:
yc compute instance-group delete --name first-instance-group
Instance Groups will launch the virtual machine deletion process.
Use the API delete method.
To request a list of available groups, use the method listInstances.
For more information about Terraform, see the documentation.
If you created an instance group using Terraform, you can delete it:
-
In the command line, go to the directory with the Terraform configuration file.
-
Delete resources using the command:
terraform destroy
Alert
Terraform deletes all the resources that you created in the current configuration, such as clusters, networks, subnets, and VMs.
-
Confirm the deletion of resources.