The two main components of Terraform are the configuration files, which define the desired state of infrastructure, and the state file, which keeps track of the current state of infrastructure.