Delve into the core concepts that form Terraform’s foundation. A strong understanding of these concepts will help you write better configurations and avoid common pitfalls.
What Will You Learn? #
Terraform is built on several fundamental concepts that differ from traditional provisioning tools. Understanding how declarative configuration, the provider ecosystem, resource lifecycles, and state management work is the key to using Terraform effectively.
Articles in This Section #
| Article | Main Topic |
|---|---|
| Declarative | The declarative paradigm: defining “what”, not “how” |
| Provider | Plugins that connect Terraform to cloud APIs and external services |
| Resource | The most important configuration block — the basic unit of managed infrastructure |
| State | The file that records the actual infrastructure condition managed by Terraform |
Key Concepts #
mindmap
root((Concept))
Declarative
Desired State
No Procedural Steps
Idempotent
Provider
Plugin System
Version Pinning
Authentication
Resource
Block Structure
Arguments
Attributes
State
State File
Remote Backend
LockingRelationships Between Concepts #
flowchart LR
subgraph Declarative["Declarative Approach"]
HCL["HCL Configuration"]
DS["Desired State"]
end
subgraph Provider["Provider Layer"]
P["Provider Plugin"]
API["Cloud API"]
end
subgraph Resource["Resource Layer"]
R["Resource Block"]
A["Attributes"]
end
subgraph State["State Layer"]
SF["State File"]
RB["Remote Backend"]
L["Locking"]
end
Declarative --> Provider
Provider --> Resource
Resource --> StateThe concepts in this section are the foundation of everything else. Once you understand them, continue to the Workflow section to see these concepts in action through Terraform’s operational cycle.