Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
© 2022 Yandex.Cloud LLC
Yandex Cloud CDN
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Resources
      • Creating a resource
      • Editing basic settings of a resource
      • Configuring resource caching
      • Configuring log export
      • Pre-loading files to CDN servers
      • Purging resource cache
      • Configuring request and response headers
      • Configuring CORS for responses to clients
      • Configuring HTTP methods
      • Enabling file compression
      • Enabling file segmentation
      • Enabling origin shielding
      • Disabling a resource
      • Deleting a resource
    • Origin groups
      • Creating an origin group
      • Editing an origin group
      • Connecting an origin group to a resource
      • Deleting an origin group
  • Practical guidelines
    • Publishing game updates
    • Integrating an L7 load balancer with the CDN and Object Storage
    • Blue-green and canary deployment
  • Concepts
    • Service overview
    • Resource
    • Origins and origin groups
    • Exchanging data between clients and the CDN
      • Overview
      • TLS certificates
      • CORS
      • Compressing content
    • Exchanging data between the CDN and origins
      • Overview
      • Host header
      • Segmenting content
      • Origin shielding
    • Caching content
    • Exporting logs
    • Quotas and limits
  • Access management
  • Troubleshooting
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • CacheService
      • OriginGroupService
      • OriginService
      • ProviderService
      • RawLogsService
      • ResourceService
      • OperationService
    • REST
      • Overview
      • Cache
        • Overview
        • prefetch
        • purge
      • OriginGroup
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • Origin
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • Provider
        • Overview
        • activate
        • listActivated
      • RawLogs
        • Overview
        • activate
        • deactivate
        • get
        • update
      • Resource
        • Overview
        • create
        • delete
        • get
        • getProviderCName
        • list
        • update
  • Pricing policy
  1. Step-by-step instructions
  2. Origin groups
  3. Deleting an origin group

Deleting origin groups

Written by
Yandex Cloud
  • Deleting one origin group
  • Deleting multiple origin groups

Deleting one origin group

To delete an origin group:

Management console
CLI
Terraform
  1. In the management console, select the folder where you wish to create a resource group.
  2. Select Cloud CDN.
  3. On the left-hand panel, select Origin groups and select the group you wish to delete.
  4. Click Delete on the bottom panel.
  5. Confirm the deletion.

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.

  1. View a description of the CLI origin group delete command below:

    yc cdn origin-group delete --help
    
  2. Get a list of all origin groups in the default folder:

    yc cdn origin-group list --format yaml
    

    Result:

    - id: "90209"
      folder_id: b1g86q4m5vej8lkljme5
      name: test-group-1
      use_next: true
      origins:
      - id: "561547"
        origin_group_id: "90209"
        source: www.example2.com
        enabled: true
        backup: true
      - id: "561546"
        origin_group_id: "90209"
        source: www.example1.com
        enabled: true
    - id: "90208"
      folder_id: b1g86q4m5vej8lkljme5
      name: test-group
      use_next: true
      origins:
      - id: "561545"
        origin_group_id: "90208"
        source: www.a2.com
        enabled: true
        backup: true
      - id: "561544"
        origin_group_id: "90208"
        source: www.a1.com
        enabled: true
    
  3. 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.

For more information about Terraform, see the documentation.

If you created an origin group using Terraform, you can delete it:

  1. In the command line, go to the directory with the Terraform configuration file.

  2. Delete the description of the desired group from the configuration file.

  3. Make sure the settings are correct.

    1. Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.

    2. Run the command:

      terraform validate
      

      If there are errors in the configuration files, Terraform will point to them.

  4. Delete the origin group.

    1. 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.

    2. If you are happy with the planned changes, apply them:

      1. Run the command:

        terraform apply
        
      2. Confirm the update of resources.

      3. Wait for the operation to complete.

Deleting multiple origin groups

To delete multiple origin groups:

Management console
  1. In the management console, select the folder where you wish to delete several resource groups.

  2. Select Cloud CDN.

  3. On the left-hand panel, select Origin group and select the groups you wish to delete.

    To delete all the groups, select the relevant option in the table header next to the Name field.

  4. Click Delete on the bottom panel.

  5. Confirm the deletion.

Was the article helpful?

Language / Region
© 2022 Yandex.Cloud LLC
In this article:
  • Deleting one origin group
  • Deleting multiple origin groups