Terraform Data Source

#HashiCorp Terraform could provision other resources that are managed by other Infrastructure as Code (IaC) tools or manual maintenance using Data Sources. However, it doesn’t have any permission other than reading the infrastructure in contrast to Terraform Providers. It can be defined in HashiCorp Configuration Language (HCL)# as follows:

data {data-source} {data-source-name} {
  ...
}

As you can see, it has highly similar syntax with resource block. We can use the variable inside the Data Source by data.{data-source}.{data-source-name}.{variable}.

#devops #iac #resource