As per Terraform definition: Data sources allow Terraform to use information defined outside of Terraform, defined by another separate Terraform configuration, or modified by functions.
They are heavily used in architecture to reference and/or get information about a resource already deployed. Data resources could be
- A common resource shared between multiple architecture
- For security reason (read-only access)
- Managed by another team
⚠️ Note that each provider may offer data sources alongside its set of resource types.