Deleting an origin group
Deleting a single origin group
To delete an origin group:
- In the management console
, select the folder where you want to create a resource group. - Select Cloud CDN.
- In the left-hand panel, go to
Origin groups and select the group to delete. - Click Delete in the bottom panel.
- In the window that opens, click Delete.
If you do not 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.
-
View a description of the CLI origin group delete command below:
yc cdn origin-group delete --help
-
Get a list of all origin groups in the default folder:
yc cdn origin-group list --format yaml
Result:
- id: "90209" folder_id: b1g86q4m5vej******** name: test-group-1 ... origin_group_id: "90208" source: www.a1.com enabled: true
-
Delete a group of origins in the default folder:
yc cdn origin-group delete --id <origin_group_ID>
For more information about the
yc cdn origin-group delete
command, see the CLI reference.
If you don't have Terraform, install it and configure the Yandex Cloud provider.
If you created an origin group using Terraform, you can delete it:
-
In the command line, go to the folder with the Terraform configuration file.
-
Delete the group description from the configuration file.
-
Make sure the settings are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Delete the origin group.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
-
Use the delete REST API method for the OriginGroup resource or the OriginGroupService/Delete gRPC API call.
Deleting multiple origin groups
To delete multiple origin groups:
-
In the management console
, select the folder to delete multiple resource groups from. -
Select Cloud CDN.
-
In the left-hand panel, navigate to
**Origin groups and select the groups to delete.To delete all the groups, select the relevant option in the table header next to the Name field.
-
Click Delete in the bottom panel.
-
In the window that opens, click Delete.