Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI Studio
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Service page
Yandex Network Load Balancer
Documentation
Yandex Network Load Balancer
  • Getting started
    • All guides
      • Information about current network load balancers
      • Creating a load balancer
      • Creating an internal load balancer
      • Stopping and starting a load balancer
      • Changing load balancer settings
      • Moving a VM to a target group in a new availability zone
      • Deleting a load balancer
      • Checking target health statuses
      • Adding a listener
      • Deleting a listener
    • Viewing service resource operations
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ

In this article:

  • Examples
  • Deleting a network load balancer from a particular folder ({from-folder})
  1. Step-by-step guides
  2. Network load balancers
  3. Deleting a load balancer

Deleting a network load balancer

Written by
Yandex Cloud
Updated at July 14, 2025
  • Examples
    • Deleting a network load balancer from a particular folder ({from-folder})
Management console
CLI
Terraform
API
  1. In the management console, select the folder where you need to delete a load balancer.
  2. In the list of services, select Network Load Balancer.
  3. Next to the load balancer you need to delete, click and select Delete.
  4. 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.

  1. See the description of the CLI command for deleting a network load balancer:

    yc load-balancer network-load-balancer delete --help
    
  2. Delete the load balancer:

    yc load-balancer network-load-balancer delete <load_balancer_name_or_ID>
    

    You can get the load balancer ID and name with the list of network load balancers in the folder.

With Terraform, you can quickly create a cloud infrastructure in Yandex Cloud and manage it using configuration files. These files store the infrastructure description written in HashiCorp Configuration Language (HCL). If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.

Terraform is distributed under the Business Source License. The Yandex Cloud provider for Terraform is distributed under the MPL-2.0 license.

For more information about the provider resources, see the relevant documentation on the Terraform website or its mirror.

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

To delete a network load balancer created with Terraform:

  1. Open the Terraform configuration file and delete the section describing the network load balancer.

    ...
    resource "yandex_lb_network_load_balancer" "foo" {
      name = "<load_balancer_name>"
      listener {
        name = "<listener_name>"
        port = <port_number>
        external_address_spec {
          ip_version = "<IP_address_version>"
        }
      }
      attached_target_group {
        target_group_id = "<target_group_ID>"
        healthcheck {
          name = "<health_check_name>"
            http_options {
              port = <port_number>
              path = "<URL>"
            }
        }
      }
    }
    ...
    
  2. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  3. Delete the network load balancer.

    1. Run this command to view the planned changes:

      terraform plan
      

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

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

To delete a network load balancer, use the delete REST API method for the NetworkLoadBalancer resource or the NetworkLoadBalancerService/Delete gRPC API call.

ExamplesExamples

Deleting a network load balancer from a particular folder ({from-folder})Deleting a network load balancer from a particular folder ({from-folder})

CLI

To delete a network load balancer from another folder, use the --folder-id or --folder-name parameters:

yc load-balancer network-load-balancer delete test-load-balancer \
   --folder-id=b1gnbfd11bq5********
yc load-balancer network-load-balancer delete test-load-balancer \
   --folder-name=test-folder

Was the article helpful?

Previous
Moving a VM to a target group in a new availability zone
Next
Checking target health statuses
© 2025 Direct Cursus Technology L.L.C.