[Yandex Cloud documentation](../../../index.md) > [Yandex Cloud Functions](../../index.md) > [Step-by-step guides](../index.md) > Managing a function > Scaling a function > Deleting scaling settings

# Deleting function scaling settings

{% list tabs group=instructions %}

- Management console {#console}

    1. In the [management console](https://console.yandex.cloud), navigate to the folder containing the function.
    1. Navigate to **Cloud Functions**.
    1. Select the function.
    1. Under **Version history**, hover over the tag of the function version (e.g., ![image](../../../_assets/console-icons/gear.svg) `$latest`) you want to delete scaling settings for.
    1. In the pop-up window, click **Scaling settings**.
    1. To delete a scaling setting, set it to zero.
    1. Click **Save**.

- CLI {#cli}

    To remove scaling settings, run this command:

    ```
    yc serverless function remove-scaling-policy \
      --id=<function_ID> \
      --tag=\$latest
    ```

    Where:

    * `--id`: Function ID. To find out the ID, [get](function-list.md) the list of functions.
    * `--tag`: Function version [tag](../../concepts/function.md#tag).

- Terraform {#tf}

    With [Terraform](https://www.terraform.io/), 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](https://github.com/hashicorp/terraform/blob/main/LICENSE). The [Yandex Cloud provider for Terraform](https://github.com/yandex-cloud/terraform-provider-yandex) is distributed under the [MPL-2.0](https://www.mozilla.org/en-US/MPL/2.0/) license.
    
    For more information about the provider resources, see the relevant documentation on the [Terraform](https://www.terraform.io/docs/providers/yandex/index.html) website or [its mirror](../../../terraform/index.md).

    If you do not have Terraform yet, [install it and configure the Yandex Cloud provider](../../../tutorials/infrastructure-management/terraform-quickstart.md#install-terraform).
    
    
    To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), [authenticate](../../../terraform/authentication.md) using the appropriate method.  

    To delete scaling settings:

    1. In the configuration file, specify the properties of the resources you want to create:

       * `yandex_function_scaling_policy`: Description of function scaling settings.
         * `function_id`: Function ID.
         * `policy`: Scaling settings:
           * `policy.0.tag`: Function version [tag](../../concepts/function.md#tag).
           * `policy.0.zone_instances_limit`: Number of function instances. Set it to `0`.
           * `policy.0.zone_requests_limit`: Number of calls in progress. Set it to `0`.

        Here is an example of the configuration file structure:

        ```
        resource "yandex_function_scaling_policy" "my_scaling_policy" {
            function_id = "are1samplefu********"
            policy {
                tag                  = "$latest"
                zone_instances_limit = 0
                zone_requests_limit  = 0
            }
        }
        ```
      
        For more information about `yandex_function_scaling_policy` properties, see [this provider guide](../../../terraform/resources/function_scaling_policy.md).
      
    1. Validate your configuration using this command:
        
       ```
       terraform validate
       ```

       If the configuration is valid, you will get this message:
        
       ```
       Success! The configuration is valid.
       ```

    1. Run this command:

       ```
       terraform plan
       ```
        
       You will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration. 
         
    1. Apply the configuration changes:

       ```
       terraform apply
       ```
    1. Type `yes` and press **Enter** to confirm the changes.

    You can check that the scaling settings are deleted using the [management console](https://console.yandex.cloud) or this [CLI](../../../cli/index.md) command:
    
    ```
    yc serverless function list-scaling-policies <function_name_or_ID>
    ```

- API {#api}

    To remove scaling settings, use the [removeScalingPolicy](../../functions/api-ref/Function/removeScalingPolicy.md) REST API method for the [Function](../../functions/api-ref/Function/index.md) resource or the [FunctionService/RemoveScalingPolicy](../../functions/api-ref/grpc/Function/removeScalingPolicy.md) gRPC API call.


{% endlist %}

## See also

* [Scaling a function](../../concepts/function.md#scaling)