Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • 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
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Virtual Private Cloud
  • Getting started
    • All guides
      • Reserving a static public IP address
      • Converting a dynamic public IP address to static
      • Converting a static public IP address to dynamic
      • Configuring deletion protection
      • Moving an address between folders
      • Getting IP address info
      • Deleting a static public IP address
    • Enabling a software-accelerated network
    • Chart of network connections
    • Viewing operations with resources
  • DDoS Protection
  • Access management
  • Pricing policy
  • Terraform reference
  • Audit Trails events
  • Release notes
  • FAQ

In this article:

  • Enabling deletion protection
  • Disabling deletion protection
  1. Step-by-step guides
  2. IP address
  3. Configuring deletion protection

Configuring deletion protection

Written by
Yandex Cloud
Updated at December 25, 2025
  • Enabling deletion protection
  • Disabling deletion protection

To prevent accidental deletion of a static public IP address, enable deletion protection for it.

You can disable this option when you no longer need it.

Enabling deletion protectionEnabling deletion protection

Management console
CLI
Terraform
API
  1. In the management console, navigate to the folder where you reserved the IP address.
  2. In the list of services, select Virtual Private Cloud.
  3. In the left-hand panel, select IP addresses.
  4. In the row with the IP address, click and select Enable deletion protection.
  5. In the window that opens, click Enable.

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 updating address attributes:

    yc vpc address update --help
    
  2. Get the list of addresses in the folder:

    yc vpc address list
    

    Result:

    +----------------------+------+---------------+----------+------+
    |          ID          | NAME |    ADDRESS    | RESERVED | USED |
    +----------------------+------+---------------+----------+------+
    | e2l46k8conff******** |      | 84.201.177.41 | false    | true |
    +----------------------+------+---------------+----------+------+
    
  3. Enable deletion protection:

    yc vpc address update --deletion-protection <address_name_or_ID>
    

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.

  1. Open the current configuration file describing the infrastructure.

  2. Add the deletion_protection parameter to the IP address description:

    resource "yandex_vpc_address" "addr" {
      ...
      deletion_protection = true
      ...
    }
    
  3. 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.

  4. Apply the changes.

    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 enable IP address deletion protection, use the update REST API method for the Address resource or the AddressService/Update gRPC API call and provide the following in the request:

  • ID of the address you want to disable protection for in the addressId parameter.

    To get the address ID, use the list REST API method for the Address resource or the AddressService/List gRPC API call and provide the folder ID in the folderId request parameter.

    To learn how to find out the folder ID, see Getting the folder ID.

  • Name of the deletionProtection parameter in the updateMask parameter.

  • true in the deletionProtection parameter.

Warning

The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

Disabling deletion protectionDisabling deletion protection

Management console
CLI
Terraform
API
  1. In the management console, navigate to the folder where you reserved the IP address.
  2. In the list of services, select Virtual Private Cloud.
  3. In the left-hand panel, select IP addresses.
  4. In the row with the IP address, click and select Disable deletion protection.
  5. In the window that opens, click Disable.

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 updating address attributes:

    yc vpc address update --help
    
  2. Get the list of addresses in the folder:

    yc vpc address list
    

    Result:

    +----------------------+------+---------------+----------+------+
    |          ID          | NAME |    ADDRESS    | RESERVED | USED |
    +----------------------+------+---------------+----------+------+
    | e2l46k8conff******** |      | 84.201.177.41 | false    | true |
    +----------------------+------+---------------+----------+------+
    
  3. Disable deletion protection:

    yc vpc address update --deletion-protection=false <address_name_or_ID>
    

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.

  1. Open the current configuration file describing the infrastructure.

  2. In the IP address description, set deletion_protection to false.

    resource "yandex_vpc_address" "addr" {
      ...
      deletion_protection = false
      ...
    }
    
  3. 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.

  4. Apply the changes.

    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 disable deletion protection for the IP address, use the update REST API method for the Address resource or the AddressService/Update gRPC API call and provide the following in the request:

  • ID of the address you want to disable protection for in the addressId parameter.

    To get the address ID, use the list REST API method for the Address resource or the AddressService/List gRPC API call and provide the folder ID in the folderId request parameter.

    To learn how to find out the folder ID, see Getting the folder ID.

  • Name of the deletionProtection parameter in the updateMask parameter.

  • false in the deletionProtection parameter.

Warning

The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

Was the article helpful?

Previous
Converting a static public IP address to dynamic
Next
Moving an address between folders
© 2025 Direct Cursus Technology L.L.C.