Terraform Associate key terms
Terraform Associate · Get comfortable with the vocabulary.
- Infrastructure as Code (IaC)
- Related: Declarative configuration, Idempotency, Terraform state
Managing and provisioning infrastructure through machine-readable definition files instead of manual console clicks or ad-hoc commands, so environments can be versioned, reviewed, shared, and rebuilt repeatably.
- Declarative configuration
- Related: Infrastructure as Code (IaC), Execution plan, HashiCorp Configuration Language (HCL)
A style of configuration where you describe the desired end state of your infrastructure and let the tool determine the steps needed, rather than scripting each individual command to run.
- Idempotency
- Related: Declarative configuration, Execution plan, State drift
The property that applying the same configuration repeatedly yields the same result: a second run with no outside changes proposes no creates, updates, or destroys.
- HashiCorp Configuration Language (HCL)
- Related: Resource block, Input variable, Terraform Registry
HashiCorp's human-readable language used in .tf files, combining a native block-and-argument syntax with expressions, functions, and features such as for expressions and conditionals.
- Provider
- Related: Provider version constraint, Terraform Registry, Dependency lock file
A plugin that teaches Terraform how to call a particular platform's API, supplying that platform's resource types, data sources, and the configuration needed to authenticate.
- Provider version constraint
- Related: Provider, terraform init, Dependency lock file
A rule written in the required_providers block, such as ~> 5.0, that limits which provider releases Terraform may install so upgrades stay predictable for everyone sharing the configuration.
- Terraform Registry
- Related: Provider, Module source, terraform init
The public catalog that hosts providers and reusable modules, which Terraform can download automatically when a configuration references a provider or module by its registry source address.
- Dependency lock file
- Related: Provider version constraint, terraform init
The .terraform.lock.hcl file records the exact provider versions and checksums chosen for a configuration, so every collaborator installs identical packages; it should be committed to version control.
- terraform init
- Related: Provider, Remote backend, terraform plan
The first command of the core workflow: it downloads required providers and modules, initializes the configured backend, and writes the dependency lock file, preparing the working directory.
- Execution plan
- Related: terraform plan, terraform apply, State drift
The set of proposed actions Terraform computes by comparing configuration, stored state, and real infrastructure; it lists which objects would be created, updated in place, replaced, or destroyed.
- terraform plan
- Related: Execution plan, terraform apply, terraform init
A read-only workflow command that builds and displays an execution plan without changing any infrastructure, letting you review what an apply would do first.
- terraform apply
- Related: terraform plan, Execution plan, terraform destroy
The workflow command that carries out the planned changes against real infrastructure, by default displaying the plan and requesting confirmation before any object is modified.
- terraform destroy
- Related: terraform apply, Terraform state, terraform state command
A command that plans and then removes every object currently tracked in state, effectively applying a configuration that contains no managed resources.
- terraform validate
- Related: HashiCorp Configuration Language (HCL), terraform plan
A check that configuration files are syntactically valid and internally consistent, such as correct argument names and value types, without contacting any provider API.
- Resource block
- Related: Data source, Lifecycle block, count
The primary configuration construct that declares one or more infrastructure objects of a given type, containing arguments for settings plus optional meta-arguments that alter behavior.
- Input variable
- Related: Output value, Local value, Module
A parameter declared with a variable block that lets callers supply values at run time, optionally constrained by a type, a default, a description, and validation rules.
- Output value
- Related: Input variable, Child module, Remote backend
A result exported with an output block; it can be displayed after apply and consumed by a parent module or by another configuration reading remote state.
- Local value
- Related: Input variable, Output value
A named expression defined in a locals block and computed once inside a module, used to avoid repeating logic; locals cannot be set from outside the module.
- Data source
- Related: Resource block, depends_on
A configuration block that reads information from a provider, such as the ID of an existing image or network, without creating or managing that object.
- count
- Related: for_each, Resource block
A meta-argument that creates a fixed number of instances of a resource or module addressed by numeric index, handy for identical copies or simple conditional creation.
- for_each
- Related: count, Resource block
A meta-argument that creates one instance per element of a map or set, keying each instance by the collection member, which is more stable than index-based addressing.
- depends_on
- Related: Resource block, Module, Data source
An explicit dependency meta-argument used when Terraform cannot infer ordering from expressions, forcing one resource or module to be processed after another.
- Lifecycle block
- Related: Resource block, Execution plan
Settings inside a resource that adjust how Terraform treats it, including create_before_destroy, prevent_destroy, ignore_changes, and replace_triggered_by.
- Module
- Related: Root module, Child module, Module source
A reusable collection of Terraform configuration files that groups related resources and exposes variables and outputs, so one pattern can be reused many times.
- Root module
- Related: Child module, Module, Terraform state
The configuration in the directory where you run Terraform commands; it is the top-level module that calls any child modules and holds the working directory's state.
- Child module
- Related: Root module, Input variable, Module source
Any module invoked from another module through a module block; it receives values through its input variables and returns results through its outputs.
- Module source
- Related: Module, Terraform Registry, terraform init
The required source argument of a module block, which can be a local path, a registry address, or a version-control URL, telling Terraform where to fetch the module code.
- Terraform state
- Related: Remote backend, State locking, State drift
The stored mapping between resources in your configuration and real infrastructure objects, recording attributes and dependencies that Terraform uses to plan accurate changes.
- Remote backend
- Related: Terraform state, State locking, HCP Terraform
A backend configuration that keeps state in a shared remote location such as object storage or HCP Terraform instead of a local file, supporting teamwork, locking, and durable storage.
- State locking
- Related: Remote backend, Terraform state, Workspace
A backend capability that prevents two Terraform operations from writing the same state at once, protecting it from corruption; not every backend type supports it.
- terraform state command
- Related: Terraform state, terraform import
A group of subcommands for inspecting and modifying state, including list, show, mv, rm, and pull, typically reserved for advanced repairs rather than routine changes.
- Workspace
- Related: Terraform state, Remote backend, HCP Terraform workspace
A named, independent state instance kept inside one configuration directory, letting a single set of files manage multiple environments without duplicating code.
- terraform import
- Related: Terraform state, State drift, terraform state command
A command that attaches existing real infrastructure to a resource address in state so Terraform can start managing it, without generating matching configuration automatically.
- State drift
- Related: Terraform state, terraform refresh, terraform plan
The gap between what state records and what actually exists, caused by changes made outside Terraform or by manual edits, which surfaces when Terraform refreshes during a plan.
- terraform refresh
- Related: State drift, Terraform state, terraform plan
An operation that reconciles state with the real attributes of managed objects; it normally runs as part of planning and can be isolated using the refresh-only planning option.
- HCP Terraform
- Related: HCP Terraform workspace, Sentinel policy, Run
HashiCorp's managed platform for running Terraform, offering remote runs, shared state, variable sets, policy enforcement, and a private registry for modules and providers.
- HCP Terraform workspace
- Related: HCP Terraform, Workspace, Run
The platform's unit of organization that holds a configuration, its variables, its state, and its run history, roughly equivalent to a working directory plus its state.
- Sentinel policy
- Related: HCP Terraform, Run
Policy-as-code rules evaluated between plan and apply in HCP Terraform, blocking or flagging runs that violate organizational constraints such as permitted regions or instance sizes.
- Run
- Related: HCP Terraform, Sentinel policy, HCP Terraform workspace
An execution of plan and apply within HCP Terraform, triggerable by a version-control commit, the API, or the CLI, with policy checks and optional approvals in between.