Process Flow - Querying existing resources
Start Terraform Config
Define data block
Terraform reads state
Look up existing resource
Extract attributes
Use attributes in config
Apply or plan
Output shows queried data
Terraform uses a data block to look up existing resources in the cloud, then extracts their details to use in your configuration.