Loading

Quipoin Menu

Learn • Practice • Grow

terraform / Terraform Architecture
tutorial

Terraform Architecture

Terraform is built around a few core components that work together to provision infrastructure. Understanding the architecture helps you use it effectively, especially when working in teams.

Core Components

  • Terraform Core: The binary that reads configuration, builds a dependency graph, and communicates with providers via RPC.
  • Configuration files: Written in HashiCorp Configuration Language (HCL) or JSON. They define what resources to create.
  • Providers: Plugins that interact with APIs of cloud platforms (AWS, Azure, GCP, etc.) or other services (Kubernetes, GitHub).
  • State: A file (terraform.tfstate) that maps your configuration to real‑world resources. It stores resource IDs, attributes, and metadata.
  • Backend: Where the state is stored – local file or remote (S3, GCS, Azure Storage, Terraform Cloud).

How Terraform Works

1. Initialization (terraform init): Downloads provider plugins, sets up backend.
2. Planning (terraform plan): Compares configuration with current state, generates an execution plan (what to add/change/destroy).
3. Applying (terraform apply): Executes the plan by making API calls through providers.
4. State update: After applying, Terraform updates the state file.

Provider Plugin Architecture

Providers are separate executables that Terraform launches. They handle authentication and API interactions. Over 1000 providers exist for AWS, Azure, Google Cloud, Kubernetes, etc.

State File Importance

The state file is critical. It can contain sensitive data (like resource IDs, possibly secrets). Do not edit it manually. For teams, store state remotely (e.g., AWS S3) with locking.


Two Minute Drill
  • Terraform Core + Providers + State file.
  • Configuration in HCL, providers interact with APIs.
  • State maps config to real resources; store remotely for teams.
  • Workflow: init → plan → apply → (state updated).

Need more clarification?

Drop us an email at career@quipoinfotech.com