Providers are plugins that enable Terraform to interact with cloud platforms, SaaS providers, and APIs. They define resource types and data sources available for use.
Example AWS provider configuration:
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}
provider "aws" {
region = "us-west-2"
}