Yandex Cloud
Search
Discuss with expertTry 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.
Terraform in Yandex Cloud
  • Getting started
  • Setting up Yandex Cloud Terraform provider authentication
    • Overview
    • Providers
    • Resources
    • Data sources
    • Modules
    • States
  • Solution library
  1. Concepts
  2. Data sources

Data sources in Terraform

Written by
Yandex Cloud
Updated at June 15, 2026

In Terraform, data sources represent a mechanism for retrieving information about resources, infrastructure, and other objects from various sources. They enable access to data you can then use to create, modify, or delete resources in your infrastructure.

Data sources yield information about existing resources, such as virtual machines, networks, databases, and other infrastructure components. Terraform requests data from sources during the plan stage and fetches them into resource attributes when building the dependency graph. If the result of a data source depends on an attribute of a resource that has not yet been created, reading is delayed until the apply stage.

Each data source has its own syntax and usage patterns. For example, for local files, you provide the file paths; for HTTP, you provide the URL and query parameters.

With data sources, you can automate your infrastructure management workflow to make sure that your real needs are met. This is of special value in large, complex environments where manual configuration is impractical or impossible.

Difference from resourcesDifference from resources

A data section only reads an existing object: it does not create, modify, or delete it. A resource section fully manages the lifecycle of an object: it creates it during apply and deletes it during destroy.

Action

Terraform section

resource

data

Create object

Deleting an object

Reading attributes

Was the article helpful?

Previous
Resources
Next
Modules
© 2026 Direct Cursus Technology L.L.C.