| 1 | configuration | describes the resources you want | the working directory | nothing: it states the goal | a plan that creates or destroys what you didn’t expect |
|---|
| 2 | lock file | pins the provider version and its checksums | the working directory, in git | which provider build init installs | two machines planning differently from the same code |
|---|
| 3 | Terraform Registry | serves providers and modules | registry.terraform.io | which versions match a constraint | init failing to find a version |
|---|
| 4 | AWS provider | makes every AWS call; owns each resource type’s schema | started by core, over gRPC | which arguments force a replacement | API errors such as BucketAlreadyOwnedByYou |
|---|
| 5 | Terraform core | reads code and state, builds the graph, plans, applies | your laptop or a CI runner | the actions and their order | a plan nobody read, applied with -auto-approve |
|---|
| 6 | saved plan | the reviewed actions, applied exactly | a file beside the code | nothing: it is replayed as written | Saved plan is stale |
|---|
| 7 | state | maps each address to one real object’s ID | a local file, then the S3 backend | what Terraform manages | resources created twice, or forgotten |
|---|
| 8 | resources in AWS | the real bucket, queue and role | account 123456789012, eu-west-1 | nothing about Terraform | drift on the next plan |
|---|
| 9 | changes outside Terraform | the console, the CLI and other tools | the same AWS account | nothing Terraform sees until a refresh | the next apply undoing a hand-made fix |
|---|
| 10 | import, moved, removed | change the state through a plan | the configuration | which address points at which object | a destroy where a rename was meant |
|---|
| 11 | lifecycle rules | limit what a plan may do to one resource | inside a resource block | destroy, forget, replacement order, ignored attributes | Instance cannot be destroyed, or no protection once the block is gone |
|---|
| 12 | S3 backend and lock file | one shared, locked, versioned state | bucket shop-tfstate | which run may write the state | Error acquiring the state lock |
|---|
| 13 | module | a folder of blocks called with inputs and outputs | the configuration | the module. prefix on every address inside | a destroy and create after moving a resource into it |
|---|
| · | data source | reads something it doesn’t manage | the configuration | nothing: it only reads | a plan that fails when the lookup finds nothing |
|---|
| · | dependency graph | orders work by references | inside core | what runs first, 10 at a time | a cycle error, or a hidden dependency missing depends_on |
|---|
| · | write-only argument | sends a secret without storing it | a resource argument | nothing: it is never read back | a password in the state when the plain argument was used |
|---|
| · | count and for_each | many copies of one block | a resource or module block | each copy’s identity: position or key | replacements after removing one list item |
|---|