Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • 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.
Terraform in Yandex Cloud
  • Getting started
  • Setting up Yandex Cloud Terraform provider authentication
    • Overview
    • Providers
    • Resources
    • Data sources
    • Modules
    • States
  • Solution library

In this article:

  • Key advantages
  • How Terraform works
  • Usage example
  • Useful links
  1. Concepts
  2. Overview

Overview

Written by
Yandex Cloud
Updated at July 13, 2026
View in Markdown
  • Key advantages
  • How Terraform works
  • Usage example
  • Useful links

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.

Key advantagesKey advantages

  • Automation: Terraform enables you to quickly and easily create, update, and delete cloud resources for streamlined infrastructure management.
  • Code reuse: Terraform supports modules reusable across different projects. This reduces development and testing time.
  • Security: Terraform provides version control and audit of infrastructure changes through state snapshots. This helps to prevent unauthorized changes and ensures data security.

How Terraform worksHow Terraform works

Terraform follows a declarative approach to infrastructure management (Infrastructure as Code, IaC). You describe the desired end state of your infrastructure, and Terraform automatically creates, modifies, or deletes resources to achieve that state.

To use Terraform, install it on your computer, configure the provider, and create configuration files (*.tf) describing your infrastructure in HashiCorp Configuration Language (HCL). Then you can use Terraform commands to create, modify, or delete resources.

Usage exampleUsage example

Let's assume you want to create a VM in Yandex Cloud. The following code describes the configuration of a terraform1 VM with 2 cores and 2 GB of RAM, a boot disk named boot-disk-1, network interface connected to subnet-1, public IP address, and SSH key from a file located at the specified path:

resource "yandex_compute_instance" "vm-1" {
  name = "terraform1"

  resources {
    cores  = 2
    memory = 2
  }

  boot_disk {
    disk_id = yandex_compute_disk.boot-disk-1.id
  }

  network_interface {
    subnet_id = yandex_vpc_subnet.subnet-1.id
    nat       = true
  }

  metadata = {
    ssh-keys = "ubuntu:${file("~/.ssh/id_ed25519.pub")}"
  }
}

This is just a simple example of how you can use Terraform. With this tool, you can create complex infrastructures with multiple resources and dependencies, provide metadata, manage resources using service accounts, and more.

Useful linksUseful links

  • Providers
  • Resources
  • State
  • Data sources in Terraform

Was the article helpful?

Previous
Setting up Yandex Cloud Terraform provider authentication
Next
Providers
© 2026 Direct Cursus Technology L.L.C.