Terraform
Terraform Data Source
Appears inTerraform Associate
A configuration block that queries information about existing infrastructure (created inside or outside of Terraform) without managing or modifying it. Syntax: data "type" "local_name" { filter arguments }.
On the exam
In Terraform Associate it's distinguished from a resource: a resource creates/manages infrastructure; a data source only reads. Question: reference the ID of a VPC created manually in the console to use it in a new subnet → data source, not resource.
Related terms
- Terraform ResourceA configuration block that describes an infrastructure object (VM, bucket, database) that Terraform creates and manages. Syntax: resource "type" "local_name" { arguments }.
- Terraform ProviderA plugin that lets Terraform interact with a specific API (AWS, Azure, GCP, Kubernetes, etc.). Each provider exposes resources and data sources. It's declared in the terraform.required_providers block.