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 Network Load Balancer
  • Getting started
    • All guides
      • Information about existing 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 operations with resources
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ
  1. Step-by-step guides
  2. Network load balancers
  3. Deleting a listener

Deleting a listener

Written by
Yandex Cloud
Updated at May 13, 2025
Management console
CLI
Terraform
API

To delete a listener for your network load balancer:

  1. In the management console, select the folder where you need to delete a load balancer listener.
  2. In the list of services, select Network Load Balancer.
  3. Select the network load balancer whose listener you need to delete.
  4. Under Listeners, click next to the listener to delete.
  5. In the menu that opens, click Remove listener.

If you do not have the Yandex Cloud (CLI) command line interface 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.

To delete a network load balancer listener, run this command:

yc load-balancer network-load-balancer remove-listener <load_balancer_name_or_ID> \
   --listener-name=<listener_name>

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

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 documentation on the Terraform website or mirror website.

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

To delete a network load balancer listener created with Terraform:

  1. Open the Terraform configuration file and delete the section describing the listener.

    resource "yandex_lb_network_load_balancer" "foo" {
      ...
      listener {
        name = "<listener_name>"
        port = <port_number>
        external_address_spec {
          ip_version = "<IP_address_version>"
        }
      }
      ...
    }
    
  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 remove a network load balancer listener, use the removeListener REST API method for the NetworkLoadBalancer resource or the NetworkLoadBalancerService/RemoveListener gRPC API call, providing the following in your request:

  • Load balancer ID in the networkLoadBalancerId parameter.
  • Listener name in the listenerName parameter.

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

Was the article helpful?

Previous
Adding a listener
Next
Information about existing target groups
Yandex project
© 2025 Yandex.Cloud LLC