Terraform: State & Modules: glossary
108 terms, in plain words, with where each one is taught.
- -backend-config
- A
terraform initflag that supplies backend settings, either askey=valueor as a file of such lines. Lesson 15.4 - -chdir
- A global Terraform option,
terraform -chdir=DIR <command>, that runs the command as if you were in DIR. - -dry-run
- A flag for
state mvandstate rmthat prints what would change and changes nothing. Lesson 15.15 - -force-copy
- A
terraform initflag that answers "yes" to the copy-state question without asking. Used in pipelines. Lesson 15.4 - -generate-config-out
- A plan flag that writes resource blocks for import blocks that have none, into a new file. A first draft to clean up. Lesson 15.25
- -lock-timeout
- A flag for plan/apply that keeps retrying a held lock for the given time (e.g.
5m) instead of failing at once. Lesson 15.11 - -lock=false
- Run a command without taking the state lock. On shared state that invites two writers at once; almost never right. Lesson 15.11
- -migrate-state
- A
terraform initflag: the backend changed, copy the state from the old location to the new one. Lesson 15.4 - -reconfigure
- A
terraform initflag: use the new backend settings and ignore the old state completely. For switching which state you point at, not for moving one. Lesson 15.4 - .terraform/terraform.tfstate
- A small file
initwrites to remember which backend and settings to use. Not your state; never committed. Lesson 15.4 - .tftest.hcl (test file)
- A Terraform test file:
variables { }plusrunblocks, in the module directory or itstests/folder. Lesson 15.53 - account key (access key, ARM_ACCESS_KEY, storage account key)
- The master password of a storage account. It grants everything on the account and cannot be limited to one container, so RBAC is preferred. Lesson 15.4
- AKS (AKS cluster, Azure Kubernetes Service)
- Azure's managed service for a group of machines that run containers for you. In this chapter it only appears as an ID or a module name. Lesson 15.25
- assert (assert block)
- A condition plus error_message in a test run; the run fails if the condition is false. Lesson 15.53
- audit log
- A record of who did what and when, e.g. every shell command typed on a machine.
- autoscaler
- A service that adds or removes machines as load changes, so the count in Azure differs from what Terraform set. Lesson 15.21
- aztfexport (Azure Export for Terraform)
- Microsoft's tool that writes Terraform code and import blocks for everything in a hand-built resource group; a starting point to clean up. Lesson 15.25
- Azure App Configuration (App Configuration)
- An Azure service that stores key/value settings; one team can publish values there for others to read. Lesson 15.30
- Azure CLI (az, az login)
- The
azcommand-line tool for Azure.az loginsigns you in on a laptop; Terraform then uses that login. Lesson 15.4 - Azure DevOps
- Microsoft's CI/CD and code hosting service; its pipeline agents show up as
AzDevOps@<agent>. Lesson 15.11 - Azure Policy (policy)
- Rules Azure applies to resources automatically, such as adding required tags or blocking some settings. A common source of drift. Lesson 15.21
- Azure Verified Modules (AVM)
- Microsoft's official, maintained Terraform modules on the public registry. Lesson 15.34
- azurerm backend
- The backend that keeps state as a blob in an Azure storage container and locks it with a blob lease. Lesson 15.4
- blob lease (leased)
- A time-limited "in use" flag Azure puts on a blob. While one run holds the lease, another cannot take it - that is how the azurerm backend locks state. Lesson 15.4
- bootstrap (bootstrap configuration, bootstrapping)
- The small, separate configuration that creates the state storage itself, before any other configuration can use it as a backend. Lesson 15.4
- CDN (content delivery network)
- Servers around the world that cache your files close to users.
- change window
- An agreed time slot when one risky change, and nothing else, is made. Lesson 15.30
- CHANGELOG
- A file listing what changed in each version, read before upgrading.
- child module
- A module called by another module (usually by the root) through a
moduleblock. Lesson 15.34 - composition
- The root calling several small modules side by side and wiring one module's outputs into another's inputs, instead of nesting modules deep. Lesson 15.41
- concurrency group (concurrency)
- A GitHub Actions setting that lets only one run at a time use a given group name, so pipeline runs on one state queue instead of colliding. Lesson 15.11
- configuration_aliases
- Declared in a module's required_providers when it needs two configurations of one provider at once (e.g. two regions); the caller passes both. Lesson 15.34
- connection string
- One string that holds everything needed to reach a database or service: address, user name and password. Lesson 15.1
- create_before_destroy (CBD)
- A lifecycle setting: on replacement create the new object first, then destroy the old (
+/-). Needs a different name on Azure, where names are unique. Lesson 15.46 - deprecated
- Still works for now, but replaced by something better and due to be removed. Lesson 15.21
- drift detection
- Running
terraform plan -detailed-exitcodeon a schedule so exit code 2 (changes) raises a ticket the next morning. Lesson 15.21 - encrypted at rest (encryption at rest)
- Stored on disk in encrypted form, so someone who steals the disk cannot read it. Azure Storage does this by default; it does not stop someone with access from reading. Lesson 15.1
- Entra ID (Azure AD, azuread)
- Azure's login system for people and programs (formerly Azure Active Directory). Identities sign in there and get roles. Lesson 15.4
- examples directory (examples/)
- A folder in a module with small callers that plan on their own: documentation you can run, and what CI tests. Lesson 15.41
- expect_failures
- In a test run: pass only if the listed validations or conditions fail - how you prove bad input is rejected. Lesson 15.53
- force-unlock (terraform force-unlock)
- Removes a state lock by its ID. Only for a lock whose holder is proven dead; unlocking a live run causes the damage locking prevents. Lesson 15.11
- GitHub Actions
- GitHub's built-in CI service; pipelines are YAML files in the repo. Lesson 15.11
- golden path
- The one approved, well-supported way to build something, offered to teams so they do not each invent their own. Lesson 15.41
- ignore_changes
- A lifecycle setting listing attributes Terraform should not compare after creation, because another system owns them. Narrow is better: one attribute or one map key. Lesson 15.21
- import (terraform import, importing, imported)
- Adopting an object that already exists: writing a state entry that maps an address in your code to its Azure ID. Nothing in Azure changes. Lesson 15.25
- import block (import { })
- An
import { to = ADDRESS id = "AZURE ID" }block in code; the import happens during plan and apply, so it is reviewed like any change (Terraform 1.5+). Lesson 15.25 - index_key
- The field in state that says which count index (
0,1) or for_each key ("app") an instance belongs to. Lesson 15.1 - just-in-time access (just-in-time)
- Write access granted for a short time only when someone asks for it, instead of permanently. Lesson 15.21
- keepers
- A map on random-provider resources: when any value in it changes, a new random value is generated.
- key (backend) (state key, backend key)
- In the azurerm backend, the blob name of one state, like
platform/dev.tfstate. One key per state. Lesson 15.4 - lineage
- A random ID written into a state when it is first created. Two states with different lineages are unrelated, and Terraform will not push one over the other. Lesson 15.1
- local state
- State kept as
terraform.tfstatenext to the code, the default when there is no backend block. Fine for experiments, wrong for anything shared. Lesson 15.1 - lock ID
- The unique ID of one state lock, shown in Lock Info.
terraform force-unlockneeds exactly this value. Lesson 15.11 - Lock Info
- The block in an "Error acquiring the state lock" message: the lock ID, which state, which operation, who holds it and since when. Lesson 15.11
- Log Analytics workspace (Log Analytics)
- Azure's store for logs you can search. Lesson 15.25
- managed resource (mode managed)
- An object Terraform created and owns (a
resourceblock), as opposed to one it only reads (adatablock). State marks them"mode": "managed"and"mode": "data". Lesson 15.1 - mock_provider (mocking)
- A fake provider in a test file that invents computed values, so apply-style tests run without a cloud account (1.7+). Lesson 15.53
- module (modules, Terraform module)
- A directory of Terraform code with inputs (variables) and outputs, called from other code like a function. Every directory of .tf files is one. Lesson 15.34
- module block (module call, module "...")
- The block that calls a module:
module "name" { source = ... inputs... }. Its resources get addresses startingmodule.name.. Lesson 15.34 - module registry (private registry)
- A place that serves versioned modules by
<namespace>/<name>/<provider>: the public Terraform Registry or a company's own. Only registry sources takeversion. Lesson 15.34 - modules.json
- The file in
.terraform/modules/where init records which module source and version it installed. Lesson 15.34 - moved vs state mv
- The same re-addressing, two forms:
movedis in code and reviewed in a plan for every state;state mvchanges one state from a shell with no review. Lesson 15.46 - Objects have changed outside of Terraform
- The note at the top of a plan listing drift: objects deleted or edited since the last apply. The plan below it would undo them. Lesson 15.21
- orphaned object (orphaned resource)
- A real object that exists in Azure but that no state knows about, e.g. created by an apply that died before writing state. Adopt it with import. Lesson 15.11
- partial configuration (partial backend configuration)
- Leaving some or all backend settings out of the code and passing them to
terraform init -backend-config=..., so one configuration can use a different state per environment. Lesson 15.4 - pinned commit
- The unique ID of one git commit. A module pinned to a SHA can never change underneath you. Lesson 15.34
- pipeline agent (agent, CI agent, build agent)
- The machine a CI system runs one job on. Its name appears as "Who" in Lock Info when a pipeline holds the lock. Lesson 15.11
- plan -destroy (-destroy)
- Shows what
terraform destroywould do without destroying anything. - prevent_destroy
- A lifecycle setting that makes any plan that would destroy the resource fail. Protects only while the block is still in the code. Lesson 15.21
- private endpoint
- An address for an Azure service inside your own private network, so it can be reached without being open to the internet. Lesson 15.4
- providers (meta-argument) (providers = { })
- The module-call argument that hands a module a non-default provider configuration, e.g.
providers = { azurerm = azurerm.dr }. Lesson 15.34 - RBAC (role-based access control)
- Role-based access control: permissions come from roles given to identities on a resource, instead of shared passwords. Lesson 15.4
- re-export
- Passing a child module's output on through a root output, so it is visible outside the root. Lesson 15.34
- ref (?ref=, git ref)
- The part of a git module source that picks a tag, branch or commit. For git modules the ref is the version. Lesson 15.34
- remote state (remote backend)
- State stored somewhere shared (a storage account, HCP Terraform) instead of a file on one machine. Lesson 15.4
- removed block (removed { }, removed)
- A block saying "stop managing this address"; with
lifecycle { destroy = false }the real object keeps existing. The reviewablestate rm(1.7+). Lesson 15.30 - replace_triggered_by
- A lifecycle setting that replaces a resource whenever a listed resource or attribute changes, even if its own arguments did not (1.2+). Lesson 15.46
- resource ID (Azure ID, Azure resource ID)
- The full path Azure uses to name one object:
/subscriptions/<id>/resourceGroups/<rg>/providers/<type>/<name>. State maps each address to one of these. Lesson 15.1 - resource lock (CanNotDelete)
- An Azure setting on a resource that blocks deleting it (or changing it) until the lock is removed. Protects the state storage from accidents. Lesson 15.4
- root module
- The directory you run Terraform in. Import blocks and backend blocks live there. Lesson 15.25
- run block (run "...")
- One step of a Terraform test: plan or apply the module with given variables and check
assertblocks. Lesson 15.53 - S3 (S3 bucket, bucket)
- Amazon's (AWS) file storage service; a bucket is a named place to store files. The
s3backend keeps state there. Lesson 15.4 - soft delete
- A storage setting that keeps a deleted blob recoverable for a number of days instead of removing it at once. Lesson 15.1
- source (module) (module source)
- Where a module's code comes from: a local path, a registry address, a git URL or an archive. Lesson 15.34
- state locking (state lock, lock (state), locking)
- Terraform taking an exclusive hold on a state before any command that could write it, so two runs cannot overwrite each other. Lesson 15.11
- state split (splitting a state)
- Moving part of a big state into its own configuration: import blocks in the new one, removed blocks in the old, applied back to back. Lesson 15.30
- Storage Blob Data Contributor
- The Azure role that may read, write and delete blobs. What an identity needs on the state container to run Terraform. Lesson 15.4
- storage container (blob container, container_name)
- A named, folder-like group of blobs inside a storage account. Unrelated to Docker containers. Lesson 15.4
- storage container resource (azurerm_storage_container)
- The azurerm resource that creates a storage container inside a storage account; needed before a backend can use it.
- taint (terraform taint, tainted, untaint)
- An old command that marked an object for replacement straight in state, with no plan. Replaced by
-replace. A tainted object is replaced at the next apply. Lesson 15.21 - tearing down (teardown)
- Destroying everything a test created once it is finished. Lesson 15.53
- terraform get
- Downloads the modules a configuration calls;
terraform initdoes this too. Lesson 15.34 - terraform refresh
- An old command that wrote refreshed values into state without review. Replaced by
apply -refresh-only. Lesson 15.21 - terraform state pull (state pull)
- Prints the current state as JSON, wherever it is stored. Redirect it to a file to take a backup before changing anything. Lesson 15.1
- terraform state push (state push)
- Overwrites the stored state with a local file. Refuses an older serial or a different lineage unless
-force; a last-resort restore. Lesson 15.15 - terraform state replace-provider (replace-provider)
- Rewrites the provider source address recorded in state, for when a provider moved to a new address. Lesson 15.15
- terraform state rm (state rm)
- Makes Terraform forget an object without touching it in Azure. Pair it with deleting the block, or the next plan tries to create it again. Lesson 15.15
- terraform state show (state show)
- Prints all attributes of one instance in state, written like a resource block. Lesson 15.15
- terraform test
- Runs the
.tftest.hcltest files of a module and exits non-zero if any assertion fails (1.6+). Lesson 15.53 - terraform_data (null_resource)
- A built-in resource that does nothing but hold values; used as a trigger for
replace_triggered_by.null_resourceis its older equivalent. Lesson 15.46 - terraform_remote_state
- A data source that reads another state's top-level outputs. Needs read access to that whole state, secrets included. Lesson 15.30
- terraform-docs
- A tool that generates a module's README inputs/outputs table from the variable and output descriptions. Lesson 15.41
- terraform.tfstate.backup (state backup)
- The previous local state, written just before every change. One step of undo, on one machine. Lesson 15.1
- thin wrapper
- A module around a single resource that only renames its arguments. Adds an interface without adding value. Lesson 15.41
- use_azuread_auth
- The azurerm backend setting that makes Terraform reach the state blob with an Entra ID identity and its role, instead of the account key. Lesson 15.4
- UUID
- A long random identifier like
3f2b1c9e-8d7a-4e6f-..., practically guaranteed to be unique. Lesson 15.1 - versioning (blob versioning)
- A storage account setting that keeps every old copy of a blob when it is overwritten, so you can go back to an earlier version. Lesson 15.1
- workspace (HCP) (HCP workspace)
- In HCP Terraform, one state plus its settings and variables. Lesson 15.4