Terraform Data Sources: Reading Existing Resources For Configuration
Terraform Data Sources reads existing resource data, unlike Resources which create new ones. It fetches data like IP addresses or virtual network IDs to use in config.
Terraform Data Sources is a function that can read data from existing resources. Unlike Terraform Resource, Data Sources does not create new resources but uses data from existing resources to complete configuration. Data Sources are used to obtain different data sources, such as the IP address of the VM instance, the ID of the virtual network, etc. This data can be used when defining other resources. Read more https://ibrahims.medium.com/data-source-terraform-674c1a404322