Menu

Terraform Architecture

Terraform Architecture

Understanding Terraform Architecture and How It Works

  • A Terraform project contains configuration files, the CLI, provider plugins and state. The CLI loads configuration, builds a dependency graph and creates a plan.
  • Providers translate Terraform operations into platform API requests. State records the identities and attributes of managed resources.

Terraform Core, Providers, Plugins and Terraform Registry

  • Terraform Core coordinates planning and execution. Providers are plugins that expose resource and data-source types; the AWS provider includes VPC, security-group and EC2 resources.
  • The Registry hosts providers and modules. Declare provider sources and version constraints, then check the provider documentation for required arguments and replacement behaviour.

Understanding Declarative Infrastructure and Resource Dependency Graphs

  • Terraform configuration describes the intended end state, not a list of imperative steps. Terraform infers dependencies when one resource references another resource's attributes.
  • Use depends_on only when a real dependency is not visible through an expression. Excessive explicit dependencies make configurations harder to understand and can reduce safe parallelism.
  • For example, an instance that references a subnet ID depends on that subnet. Terraform builds a graph and can perform independent operations in parallel.

Terraform Tutorial

HA

Harini A



Learn via Video Course

undefined Logo

NaN hrs



Get in Touch For Details