The official HashiCorp Certified: Terraform Infrastructure Engineer Professional (002) syllabus, organized by domain. Check off each point as you review it.
Inicia sesión para guardar tu progreso entre sesiones.
1a Translate business requirements into infrastructure code
Translating requirements into code means picking the right construct: typed variables, optional() attributes with defaults and validation for rules that must stop the plan; for_each over a map when each instance has its own settings, and a conditional count to create a resource or not. In shared modules, the name prefix should be an input variable set by the caller.
1b Predictable and secure Terraform configuration
A predictable configuration refactors with moved blocks, which are kept because removing them is a breaking change, and keeps provider blocks out of shared modules. The style guide asks for a type and description on every variable, separate state per environment and no state or saved plans in version control; sensitive does not keep a value out of state.
1c Trace input variables, local values, and outputs to identify the source of a configuration issue
To find where a wrong value comes from, follow the variable -> local -> output chain: precedence (-var and -var-file, then *.auto.tfvars in lexical order, terraform.tfvars, TF_VAR_ and the default), type conversion (extra object attributes are discarded, list(string) converts numbers and bools) and scope: locals exist only in their module and a parent sees only the child's outputs.
Use input variables to add module arguments ↗Type Constraints ↗
1d Trace dynamic resources created with for_each
With for_each, each instance is identified by its map key or set member (resource["key"], or module.name["key"].resource when it is on the module); for a set, each.value equals each.key. Removing a key destroys only that instance, a for_each resource is used as a map of objects, and the keys must be known at plan time.
1e Predict the value of an expression that uses a Terraform function
To predict a function result, evaluate from the inside out: merge gives priority to the later argument, keys() and values() follow the lexical order of the keys, zipmap uses the highest index for a repeated key, slice includes the start and excludes the end, element wraps around with modulo, coalesce skips null and "" and try returns the first argument that does not fail.
1f Implement advanced configurations
Dynamic blocks generate repeatable nested blocks (never lifecycle or provisioner) and for and splat expressions transform collections; a splat on null yields an empty tuple. Variable validations, preconditions and postconditions stop the operation, while check blocks only warn. replace_triggered_by accepts only managed resources, so terraform_data carries plain values into it.
Validate your configuration ↗lifecycle meta-argument reference ↗
1g Configure Terraform providers
Provider configurations belong in the root module; child modules inherit only default configurations, and aliased ones are passed with the providers argument and declared with configuration_aliases. Each module declares its own required_providers with source and a minimum version, and .terraform.lock.hcl locks providers only; terraform providers lock -platform adds checksums for other platforms.
Providers Within Modules ↗Dependency Lock File (.terraform.lock.hcl) ↗
1h Use the Terraform MCP server to enhance development with AI coding agents
The Terraform MCP server is HashiCorp's Model Context Protocol server: it gives AI agents current provider, module and policy documentation from the registry instead of stale training data. The registry-private and terraform toolsets need a valid TFE_TOKEN, and destructive operations also need ENABLE_TF_OPERATIONS=true. It uses stdio locally and streamable HTTP for remote deployments; always review generated code.
Terraform MCP server overview ↗Terraform MCP server reference ↗