Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Application Load Balancer
  • Getting started
    • All guides
    • Creating Application Load Balancer infrastructure through a wizard
      • Creating an HTTP router for HTTP traffic
      • Creating an HTTP router for gRPC traffic
      • Getting information about an HTTP router
      • Editing an HTTP router
      • Deleting an HTTP router
    • Viewing operations with resources
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • L7 load balancer logs
  • Release notes
  1. Step-by-step guides
  2. HTTP routers
  3. Deleting an HTTP router

Deleting an HTTP router

Written by
Yandex Cloud
Updated at May 5, 2025

Warning

You cannot delete an HTTP router used in a load balancer. First, you need to remove it from all load balancers.

To delete an HTTP router:

Management console
CLI
Terraform
API
  1. In the management console, select the folder with your HTTP router.

  2. Select Application Load Balancer.

  3. Select your router and click .

  4. In the menu that opens, select Delete.

    To delete multiple routers at once, select them in the list and click Delete at the bottom of the screen.

  5. In the window that opens, click Delete.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. See the description of the CLI command for deleting an HTTP router:

    yc alb http-router delete --help
    
  2. Run this command with your HTTP router name specified:

    yc alb http-router delete --name <HTTP_router_name>
    

    To check whether your router has been deleted, get a list of HTTP routers by running the command:

    yc alb http-router list
    

If you do not have Terraform yet, install it and configure its Yandex Cloud provider.

To delete an HTTP router or virtual host created with Terraform:

  1. Open the Terraform configuration file and delete the fragment describing the HTTP router or virtual host, i.e., yandex_alb_http_router or yandex_alb_virtual_host resource, respectively.

    Sample HTTP router and virtual host description in the Terraform configuration
    ...
    resource "yandex_alb_http_router" "tf-router" {
      name   = "my-http-router"
      labels = {
        tf-label    = "tf-label-value"
        empty-label = ""
      }
    }
    
    resource "yandex_alb_virtual_host" "my-virtual-host" {
      name           = "my-virtual-host"
      http_router_id = "${yandex_alb_http_router.tf-router.id}"
      route {
        name = "my-route"
        http_route {
          http_route_action {
            backend_group_id = "${yandex_alb_backend_group.backend-group.id}"
            timeout          = "3s"
          }
        }
      }
    }
    ...
    
  2. In the command line, navigate to the directory with the Terraform configuration file.

  3. Check the configuration using this command:

    terraform validate
    

    If the configuration is correct, you will get this message:

    Success! The configuration is valid.
    
  4. Run this command:

    terraform plan
    

    You will see a detailed list of resources. No changes will be made at this step. If your configuration contains errors, Terraform will show them.

  5. Apply the changes:

    terraform apply
    
  6. Type yes and press Enter to confirm changes.

    You can check updates in the management console or using this CLI command:

    yc alb http-router list
    

Use the delete REST API method for the HttpRouter resource or the HttpRouter/Delete gRPC API call.

Was the article helpful?

Previous
Editing an HTTP router
Next
Creating an L7 load balancer
Yandex project
© 2025 Yandex.Cloud LLC