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
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 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
      • Moving an address between folders
      • Getting information about an IP address
      • Deleting a static public IP address
    • Enabling a software-accelerated network
    • Chart of network connections
    • Viewing operations with resources
  • DDoS Protection
  • Access management
  • Terraform reference
  • Audit Trails events
  • Release notes
  • FAQ
  1. Step-by-step guides
  2. IP address
  3. Reserving a static public IP address

Reserving a static public IP address

Written by
Yandex Cloud
Improved by
Danila N.
Updated at May 5, 2025

You can reserve a static public IP address to use later for accessing cloud resources.

Note

Make sure to check out our pricing policy for inactive static public IP addresses.

Management console
CLI
Terraform
API
  1. In the management console, go to the page of the folder where you want to reserve an IP address.
  2. In the list of services, select Virtual Private Cloud.
  3. In the left-hand panel, select IP addresses.
  4. Click Reserve address.
  5. In the window that opens:
    • In the Availability zone field, select the availability zone where you want to reserve the address.
    • (Optional) Under Advanced, enable DDoS protection and Deletion protection.
  6. Click ** Reserve**.

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 reserve address command:

    yc vpc address create --help
    
  2. Reserve the address by specifying the availability zone:

    yc vpc address create --external-ipv4 zone=ru-central1-a
    

    Result:

    id: e9b6un9gkso6********
    folder_id: b1g7gvsi89m3********
    created_at: "2021-01-19T17:52:42Z"
    external_ipv4_address:
      address: 178.154.253.52
      zone_id: ru-central1-a
      requirements: {}
    reserved: true
    

    The static public IP address is reserved.

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.

  1. In the configuration file, define the parameters of the resources you want to create:

    • name: Static public IP address name. The name format is as follows:

      • It must be from 2 to 63 characters long.
      • It may contain lowercase Latin letters, numbers, and hyphens.
      • It must start with a letter and cannot end with a hyphen.
    • deletion_protection: Protection of your static public IP address against deletion. You cannot delete an IP address with this option enabled. The default value is false.

    • external_ipv4_address: IPv4 address description:

      • zone_id: Availability zone.

    Here is an example of the configuration file structure:

    resource "yandex_vpc_address" "addr" {
      name = "<IP_address_name>"
      deletion_protection = "<deletion_protection>"
      external_ipv4_address {
        zone_id = "<availability_zone>"
      }
    }
    

    For more information about the yandex_vpc_address resource parameters in Terraform, see the provider documentation.

  2. Create resources:

    1. In the terminal, change to the folder where you edited the configuration file.

    2. Make sure the configuration file is correct using the command:

      terraform validate
      

      If the configuration is correct, the following message is returned:

      Success! The configuration is valid.
      
    3. Run the command:

      terraform plan
      

      The terminal will display a list of resources with parameters. No changes are made at this step. If the configuration contains errors, Terraform will point them out.

    4. Apply the configuration changes:

      terraform apply
      
    5. Confirm the changes: type yes in the terminal and press Enter.

    This will create all the resources you need in the specified folder. You can check the new resources and their configuration using the management console or this CLI command:

    yc vpc address list
    

To reserve a static IP address, use the create REST API method for the Address resource or the AddressService/Create gRPC API call, and provide the following in the request:

  • ID of the folder the static IP address will reside in, in the folderId parameter.

  • Name of the static public IP address, in the name parameter. The name format is as follows:

    • It must be from 2 to 63 characters long.
    • It may contain lowercase Latin letters, numbers, and hyphens.
    • It must start with a letter and cannot end with a hyphen.
  • ID of the availability zone the address will reside in, in the externalIpv4AddressSpec.zoneId parameter.

Was the article helpful?

Previous
Viewing a list of used addresses
Next
Converting a dynamic public IP address to static
© 2025 Direct Cursus Technology L.L.C.