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 CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
-
View the description of the CLI command to delete an origin group:
yc cdn origin-group delete --help -
Get a list of all origin groups in the default folder:
yc cdn origin-group list --format yamlResult:
- id: "90209" folder_id: b1g86q4m5vej******** name: test-group-1 ... origin_group_id: "90208" source: www.a1.com enabled: true -
Delete an origin group in the default folder:
yc cdn origin-group delete --id <origin_group_ID>For more information about the
yc cdn origin-group deletecommand, see the CLI reference.
If you do not have Terraform yet, 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 directory with the Terraform configuration file.
-
Delete the group description from the configuration file.
-
Make sure the settings are correct.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Delete the origin group.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the 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.