Terraform needs a way to talk to each cloud API and a way to name the things it should manage. Providers are the plugins for each API, and resources are the objects you declare, like a VPC and its subnet; references between them set the creation order. When you only need to read something that already exists, such as the latest Ubuntu AMI, use a data source instead of a resource. Resource vs data source is a common interview question.