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 Managed Service for YDB
  • Getting started
  • Access management
  • Monitoring metrics
  • Audit Trails events
    • Introduction to YDB via Terraform
    • Getting authentication credentials
    • Installing and configuring Terraform and a provider to connect to YDB
    • Creating configuration files and connecting to YDB
    • Creating and editing parameters of a serverless database
    • Creating and editing parameters of a dedicated database
    • Creating row tables in a database
    • Creating document tables in a database
    • Creating a changefeed for a table
    • Creating secondary indexes in row tables
    • Managing YDB topic configurations
  • FAQ
  • Public materials

In this article:

  • Installing Terraform for Windows, Linux, and macOS from the HashiCorp website
  • Installing a YDB provider
  1. Working with YDB via Terraform
  2. Installing and configuring Terraform and a provider to connect to YDB

Installing and configuring Terraform and a provider to connect to YDB

Written by
Yandex Cloud
Updated at June 6, 2024
  • Installing Terraform for Windows, Linux, and macOS from the HashiCorp website
  • Installing a YDB provider

You can download Terraform from the official HashiCorp website. If the site is unavailable, use our specially created mirror. Download the Terraform distribution for your platform and add the path to the folder with the executable to the PATH: export PATH=$PATH:/path/to/terraform variable.

Installing Terraform for Windows, Linux, and macOS from the HashiCorp websiteInstalling Terraform for Windows, Linux, and macOS from the HashiCorp website

Linux
macOS
Windows
  • Download the Terraform distribution and follow this guide to install it.
  • Download the Terraform distribution and follow this guide to install it.
  • Install Terraform using the Homebrew package manager and the brew install terraform command.
  • Download Terraform from the official website and follow this guide to install it.
  • Install Terraform using the Chocolatey package manager and the choco install terraform command.

Once you have installed Terraform, configure it to access YDB. First, install a provider to connect to YDB and provide API methods.

Installing a YDB providerInstalling a YDB provider

Terraform will download and install a provider from the URL specified by the user in the provider_installation section of the .terraformrc file.

Linux/macOS
Windows
  1. Open the Terraform CLI configuration file (~/.terraformrc) in any text editor.

    Note

    The .terraformrc file must be in the user's home root folder, e.g., /home/user/ or /User/user/.

  2. Add the following section to the file:

    provider_installation {
        network_mirror {
            url = "https://terraform-mirror.yandexcloud.net/"
            include = ["registry.terraform.io/*/*"]
    }
        direct {
            exclude = ["registry.terraform.io/*/*"]
        }
    }
    
  1. Open the Terraform CLI configuration file named terraform.rc in your user's %APPDATA% folder.

  2. Add the following section to the file:

    provider_installation {
        network_mirror {
            url = "https://terraform-mirror.yandexcloud.net/"
            include = ["registry.terraform.io/*/*"]
    }
        direct {
            exclude = ["registry.terraform.io/*/*"]
        }
    }
    

This completes the installation and configuration of Terraform and the provider for connection to YDB. You can move on to creating configuration files for YDB access.

Was the article helpful?

Previous
Getting authentication credentials
Next
Creating configuration files and connecting to YDB
© 2025 Direct Cursus Technology L.L.C.