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
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud DNS
  • Getting started
    • All guides
      • Creating a record
      • Updating a record
      • Deleting a record
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ
  1. Step-by-step guides
  2. Records
  3. Updating a record

Updating a resource record

Written by
Yandex Cloud
Updated at May 5, 2026

You can update the value of a resource record. To update a record:

Management console
CLI
Terraform
API
  1. In the management console, select a folder to modify the DNS zone record in.
  2. Select Cloud DNS.
  3. Select the zone from the list.
  4. Click next to the record you need and select Edit.
  5. Edit the record TTL, value, or description.
  6. Click Save.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

To update a DNS zone:

  1. See the description of the CLI command for updating a resource record:

    yc dns zone replace-records --help
    
  2. Change the record value:

    yc dns zone replace-records --name <zone_name> \
    --record "<domain_name> 600 <record_type> <new_value>" \
    --description "<description>"
    

Where:

  • --name: Zone name. It must be unique within a folder.
  • --record: DNS record containing the domain name, TTL, record type, and record value.
  • --description: Description for the new records. If this flag is not set, the description will be empty. This is an optional setting.

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

To update a DNS record created with Terraform:

  1. Open the Terraform configuration file and edit the fragment describing your DNS record.

    Terraform DNS record description example
    ...
    resource "yandex_dns_recordset" "rs1" {
      zone_id = yandex_dns_zone.zone1.id
      name    = "srv.example.com."
      type    = "A"
      ttl     = 200
      data    = ["10.1.0.1"]
      description = "Web server A record"
    }
    ...
    
  2. Check the configuration using this command:

  3. Apply the changes:

    1. In the terminal, navigate to the configuration file directory.

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

      terraform validate
      

      If the configuration is valid, you will get this message:

      Success! The configuration is valid.
      
    3. 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.

    4. Apply the configuration changes:

      terraform apply
      
    5. Type yes and press Enter to confirm the changes.

    You can verify DNS record changes in the management console or using this CLI command:

    yc dns zone list-records <zone_name>
    

To update a DNS resource record, use the updateRecordSets REST API method for the DnsZone resource or the DnsZoneService/UpdateRecordSets gRPC API call.

The value of resource TXT records cannot contain more than 255 characters per line and 1024 characters total. If the new value contains more characters, split it into multiple values.

Note

You cannot modify service resource records.

Was the article helpful?

Previous
Creating a record
Next
Deleting a record
© 2026 Direct Cursus Technology L.L.C.