Terraform Associate flashcards
Terraform Associate · Build recall with a focused review session.
32 cards. Read the term and the definition here. The deck at the top of this page is optional.
- Infrastructure as Code
- Practice of defining and provisioning infrastructure through machine-readable files kept in version control, making deployments repeatable, reviewable, and automated instead of manual console work.
- Declarative configuration model
- Approach where configuration describes the desired end state and the tool determines which API calls to make, in contrast to imperative scripts that list each step.
- Idempotency
- Property whereby applying the same configuration repeatedly against unchanged infrastructure produces no changes, because Terraform compares desired state with recorded state before acting.
- Configuration drift
- Divergence between real infrastructure and recorded state or configuration, usually caused by manual changes, detected during refresh and corrected by the next apply.
- HCL block syntax
- Terraform language structure of a block type followed by optional quoted labels and a brace body holding key = value arguments and nested blocks.
- Provider
- Plugin that translates Terraform configuration into API calls for a platform such as AWS or Azure, configured in a provider block and pinned in required_providers.
- Data source
- Read-only lookup of an object Terraform does not manage, declared in a data block and referenced as data.type.name.attribute elsewhere in configuration.
- Pessimistic version constraint
- The ~> operator permits only the rightmost version component to increase, so ~> 5.1 allows 5.2 through 5.9 but rejects 6.0.
- terraform init
- First workflow command; downloads required providers and modules, creates the .terraform directory, writes the dependency lock file, and initializes the configured backend.
- terraform validate
- Checks configuration syntax, argument names, and internal references for consistency without contacting provider APIs or reading remote state.
- terraform plan
- Previews proposed changes by refreshing state and comparing configuration with real infrastructure; the -out flag saves the result for exact later application.
- Saved plan file
- Artifact produced by terraform plan -out=FILE; applying it with terraform apply FILE performs exactly the previewed actions without planning again.
- count meta-argument
- Creates a fixed number of resource instances addressed by numeric index such as aws_instance.web[0], with count.index available inside the block.
- for_each meta-argument
- Creates one instance per element of a map or set of strings, addressed by string key, which gives stable identity when collection order changes.
- lifecycle block
- Resource meta-argument adjusting behavior through create_before_destroy, prevent_destroy, ignore_changes, and replace_triggered_by settings.
- Sensitive variable
- Input declared with sensitive = true, which redacts its value from CLI plan and apply output while still storing the value in state.
- Root module
- The directory where terraform commands are run; its .tf files form the top-level configuration that calls child modules and configures providers.
- Module source argument
- Value specifying where a child module lives: a local path, a registry address of namespace/name/provider, a Git or HTTP URL, or an object storage bucket.
- Module output reference
- Expression module.MODULE_NAME.OUTPUT_NAME that reads an output declared inside a child module and exposes it to the calling configuration.
- terraform get
- Command that downloads modules referenced by configuration into .terraform/modules; terraform init performs this automatically and -upgrade fetches newer allowed versions.
- Terraform state
- Data mapping resource addresses in configuration to real remote object identifiers, plus cached attributes, required so Terraform knows what it manages.
- State locking
- Mechanism preventing concurrent runs from writing the same state simultaneously; native in HCP Terraform and implemented with DynamoDB for the S3 backend.
- terraform state mv
- Command that moves a resource from one address to another within state, preserving the real infrastructure instead of destroying and recreating it.
- terraform import
- Command that adopts an existing real object into state at a given resource address; it does not generate matching configuration for that resource.
- terraform taint
- Legacy command marking an object as degraded so the next apply destroys and recreates it; the plan -replace=ADDRESS option supersedes it.
- moved block
- Configuration block recording that a resource was renamed or relocated between modules, preventing Terraform from destroying and recreating it during refactoring.
- terraform providers lock
- Command that records checksums for provider packages of specified platforms in the dependency lock file, supporting offline and cross-platform installs.
- TF_LOG variable
- Environment variable setting Terraform logging verbosity to TRACE, DEBUG, INFO, WARN, or ERROR and sending detailed core and provider messages to stderr.
- HCP Terraform workspace
- Isolated environment holding state, variables, and run history for one configuration, driven either by the CLI, a VCS repository, or the API.
- cloud block
- Configuration block naming organization and workspaces so the local CLI executes runs remotely in HCP Terraform rather than using local state.
- Variable set
- Reusable collection of Terraform or environment variables in HCP Terraform that can be applied across many workspaces at once.
- Sentinel policy
- Policy-as-code in HCP Terraform evaluated between plan and apply; a failing policy blocks the run unless an authorized user overrides it.