The four fundamental Terraform components
Configuration defines the intended infrastructure using Terraform's configuration language, including resources, variables, modules and outputs. Providers connect Terraform to external systems and expose resource types and data sources supported by their implementations. State records the relationship between Terraform resource addresses and real infrastructure objects. Execution plans describe proposed operations before those operations are performed. These components work together, but each has a different responsibility. A valid configuration does not prove that the cloud account has sufficient permissions. An execution plan does not guarantee that an external API will accept every operation. A successful infrastructure deployment does not prove that the application is functioning correctly.
Terraform's familiar workflow is to write configuration, initialize dependencies, generate a plan and apply approved changes. Its official introduction explains the relationship between configuration, providers, state and the dependency graph: What is Terraform?.


