Terraform Glossary A-Z

Complete glossary of Terraform and Infrastructure as Code terms. From Apply to Workspace, understand every concept used in Terraform.

A B C D E F G H I L M N O P R S T V W

A

Apply

The terraform apply command executes planned changes to create, update, or destroy infrastructure resources.

Attribute

A named value within a resource or data source, either set in configuration (arguments) or computed by the provider (read-only attributes).

AWS Provider

The official Terraform provider for Amazon Web Services, enabling management of EC2, S3, VPC, IAM, and hundreds of other AWS services.

B

Backend

Configuration that determines where Terraform stores its state data. Examples include local files, S3, Azure Blob Storage, or Terraform Cloud.

Block

A container in HCL that groups related configuration. Common blocks include resource, data, variable, output, module, and provider.

C

CLI

Command Line Interface — the primary way to interact with Terraform through commands like init, plan, apply, and destroy.

Count

A meta-argument that creates multiple instances of a resource based on a numeric value. Use count.index to reference the current iteration.

Configuration

A set of .tf files that describe the desired infrastructure state using HashiCorp Configuration Language (HCL).

D

Data Source

A read-only query to fetch information from a provider (e.g., looking up an AMI ID or existing VPC). Defined with data blocks.

Depends On

A meta-argument that creates explicit dependencies between resources when Terraform can't automatically detect them.

Destroy

The terraform destroy command removes all resources managed by the current Terraform configuration.

Drift

When real infrastructure differs from what's recorded in Terraform state, usually from manual changes outside Terraform.

Dynamic Block

A special block type that generates repeated nested blocks programmatically, replacing hard-coded repetitive configurations.

E

Expression

A piece of HCL syntax that produces a value — includes literals, references, function calls, conditionals, and for expressions.

F

For Each

A meta-argument that creates resource instances from a map or set, with each.key and each.value referencing current iteration.

Function

Built-in operations like length(), join(), merge(), lookup(), and cidrsubnet() used in expressions to transform data.

Format

The terraform fmt command rewrites .tf files to the canonical HCL style for consistency.

G

Graph

Terraform's internal dependency graph that determines the correct order for creating, updating, or destroying resources.

H

HCL

HashiCorp Configuration Language — the declarative language used to write Terraform configurations. Supports JSON alternative.

HashiCorp

The company that created Terraform, along with Vault, Consul, Nomad, Packer, and other infrastructure tools.

I

Import

Bringing existing infrastructure under Terraform management. Available via terraform import command or import blocks (1.5+).

Init

The terraform init command initializes a working directory — downloads providers, configures backends, and installs modules.

Infrastructure as Code

The practice of managing and provisioning infrastructure through machine-readable configuration files rather than manual processes.

L

Lifecycle

A meta-argument block controlling resource behavior: create_before_destroy, prevent_destroy, ignore_changes, replace_triggered_by.

Local Values

Named expressions defined in locals blocks, useful for reducing repetition and computing intermediate values.

Lock

State locking prevents concurrent Terraform operations from corrupting state. Implemented via DynamoDB, Azure Blob leases, etc.

M

Module

A reusable container of Terraform configuration. Every .tf directory is a module. Modules accept inputs (variables) and return outputs.

Moved Block

Declared in configuration to tell Terraform that a resource has been renamed or moved to a module, preventing destroy+recreate.

N

Null Resource

A resource that doesn't manage real infrastructure but can run provisioners. Largely replaced by terraform_data in 1.4+.

O

Output

A declared return value from a module. Root module outputs display after apply; child module outputs are accessible by the caller.

P

Plan

The terraform plan command compares desired state (config) with actual state and shows what changes Terraform will make.

Provider

A plugin that implements resource types for a specific platform (AWS, Azure, GCP, Kubernetes, etc.). Configured in provider blocks.

Provisioner

A mechanism to execute scripts on a resource after creation (e.g., remote-exec, local-exec). Use as a last resort.

R

Registry

The Terraform Registry (registry.terraform.io) hosts providers, modules, and policy libraries shared by the community.

Remote State

State stored in a shared backend (S3, Azure Blob, GCS, Terraform Cloud) enabling team collaboration and state locking.

Resource

The fundamental building block — each resource block describes one or more infrastructure objects (VMs, networks, DNS records, etc.).

S

State

A JSON file (terraform.tfstate) that maps your configuration to real-world resources. Critical for Terraform's operation.

Sensitive

A flag on variables and outputs that prevents values from being displayed in CLI output and plan logs.

Splat Expression

Shorthand syntax (resource.*. attr) to collect an attribute from all instances of a resource.

T

Terraform Cloud

HashiCorp's managed service for remote Terraform operations, state management, policy enforcement, and team collaboration.

Taint

Marking a resource for forced recreation on the next apply. Deprecated in favor of terraform apply -replace.

Type Constraint

Variable type declarations like string, number, bool, list(), map(), object(), and tuple() that validate input values.

V

Variable

An input parameter declared with variable blocks. Supports type constraints, default values, descriptions, and validation rules.

Validate

The terraform validate command checks configuration for syntax errors and internal consistency without accessing remote state.

W

Workspace

Named instances of state within the same configuration. Used to manage multiple environments (dev, staging, prod) from one codebase.

LEARN BY DOING

Hands-On Courses on CopyPasteLearn

Interactive, project-based learning — copy, paste, and understand

Terraform for Beginners Ansible Quickstart OpenClaw Agent MLflow MLOps