HCTA logo
Focused certification exam prep
Start practice

HCTA Domain 8: Read, Generate, and Modify Configuration 2026

TL;DR
  • Domain 8 is the single heaviest domain on the HCTA exam, weighted at 16% of total score.
  • You must be able to read, write, and troubleshoot real HCL configuration - not just recall definitions.
  • Variables, outputs, locals, data sources, and built-in functions are all explicitly testable topics within this domain.
  • Dynamic blocks and meta-arguments like for_each and count appear in scenario-based questions that require hands-on reasoning.

What Domain 8 Actually Tests

The official name - Read, Generate, and Modify Configuration - tells you almost everything. This domain does not ask you to memorize a list of Terraform commands or recall abstract theory. It puts actual HCL in front of you and expects you to understand what happens when that code runs, what would break if a line changed, and how to extend or fix it correctly.

At its core, Domain 8 covers the language of Terraform itself: HashiCorp Configuration Language (HCL). That includes understanding block types, argument syntax, expression evaluation, type constraints on variables, the difference between a local value and an output, and how Terraform resolves references at plan time. Candidates who have only read documentation but never written or read HCL in anger consistently underperform here.

Why This Domain Is Different: Most HCTA domains test conceptual understanding - you can reason through them with solid Terraform knowledge. Domain 8 tests applied literacy. You need to parse a configuration block quickly, identify its intent, and spot what is missing or wrong. That skill only develops through repeated exposure to real HCL.

The domain is also unusually broad. It spans the full lifecycle of configuration: reading an existing file and understanding its dependencies, generating new resource blocks with correct syntax, and modifying existing configuration to meet a new requirement without breaking state or existing behavior. Each of those three verbs - read, generate, modify - represents a distinct cognitive task, and the exam tests all three.

Why Domain 8 Carries the Most Weight

At 16%, Domain 8 is the highest-weighted domain on the entire HCTA exam. To put that in context across the nine domains:

Domain Weight Category
Domain 1: Understand IaC Concepts 8% Conceptual
Domain 2: Understand the Purpose of Terraform 8% Conceptual
Domain 3: Understand Terraform Basics 11% Foundational
Domain 4: Use Terraform Outside of Core Workflow 8% Applied
Domain 5: Interact with Terraform Modules 13% Applied
Domain 6: Use the Core Terraform Workflow 9% Applied
Domain 7: Implement and Maintain State 13% Applied
Domain 8: Read, Generate, and Modify Configuration 16% Applied / Language
Domain 9: Understand HCP Terraform Capabilities 14% Platform

No other domain even comes close in individual weighting. Together, Domains 7, 8, and 9 account for 43% of the exam. If you want to pass the HCTA, you cannot afford to treat Domain 8 as one item on a checklist - it is the single biggest lever you can pull on your score.

Organizations hiring for roles that carry HCTA as a preferred or required credential - DevOps engineers, cloud infrastructure engineers, platform engineers, and site reliability engineers - care about Domain 8 skills because configuration authoring is the daily job. Reading an unfamiliar Terraform codebase and extending it safely is not a bonus skill; it is the core task.

HCL Fundamentals You Must Know Cold

HCL is deceptively readable. Its JSON-like syntax makes it look approachable, but the HCTA exam probes the edges: what is technically valid versus what Terraform actually accepts, how block nesting works, and how attribute versus block argument syntax differs.

Core HCL Concepts for Domain 8

Candidates must understand how HCL structures map to Terraform's internal model and how expressions are evaluated.

  • Block types: resource, data, variable, output, locals, module, terraform, provider
  • Argument syntax vs. block syntax within resource configurations
  • String interpolation and template expressions
  • Reference syntax: var., local., module., data., resource_type.name.attribute
  • Implicit and explicit dependencies between resources
  • The depends_on meta-argument and when it is actually necessary

A question you should be able to answer without hesitation: given a resource block that references an output attribute of another resource, does Terraform automatically understand the dependency? Yes - through implicit dependency via reference. Now what if the dependency is behavioral rather than attribute-based? That is when depends_on enters the picture. Domain 8 questions are built around exactly these distinctions.

File Organization and the terraform.tfvars Pattern

Domain 8 also tests your understanding of how Terraform loads configuration files. All .tf files in a directory are merged into a single configuration, but the order of precedence for variable values - default values, terraform.tfvars, *.auto.tfvars, and -var flags - is a topic the exam returns to repeatedly. Know the precedence order precisely.

Variables, Outputs, and Data Sources

Three block types appear on virtually every Domain 8 question set: variable, output, and data. Each has distinct attributes, distinct behavior, and distinct failure modes.

Input Variables

Input variables are how configuration becomes reusable. The HCTA exam tests type constraints (string, number, bool, list, map, object, tuple, set), the validation block, the sensitive argument, and the nullable argument. A common question pattern presents a variable block with a type constraint and asks what happens when an incompatible value is passed - does Terraform coerce the type, throw a validation error, or fail at plan?

Output Values

Outputs serve two purposes: exposing values to the console after apply, and making values available to parent modules. The sensitive argument on outputs prevents values from appearing in logs. Candidates frequently misunderstand when output values are computed versus when they are available, particularly in the context of terraform output commands and module composition.

Data Sources

Data sources let configuration read information from providers without creating or managing that resource. Domain 8 questions often involve distinguishing a data block from a resource block visually - they look similar - and understanding that data sources are read during the plan phase, not the apply phase. The timing of data source reads relative to resource creation is a documented gotcha the exam exploits.

Key Takeaway

When a data source depends on a resource that has not yet been created, Terraform cannot resolve the data source at plan time. Knowing when to use depends_on on a data source - and what the consequences are - is a Domain 8 topic with real exam presence.

Built-in Functions and Expressions

Terraform ships with a substantial library of built-in functions. Domain 8 does not require you to memorize every function, but it does expect familiarity with the categories and the functions most commonly used in production configurations.

High-Priority Built-in Functions

These function categories appear most frequently in Domain 8 scenario questions.

  • String functions: format, formatlist, join, split, trimspace, replace
  • Collection functions: length, toset, tolist, tomap, lookup, merge, flatten, distinct
  • Numeric functions: max, min, ceil, floor
  • Type conversion functions: tostring, tonumber, tobool
  • Filesystem functions: file, filebase64, templatefile
  • Encoding functions: base64encode, base64decode, jsonencode, jsondecode

The for expression and the conditional expression (condition ? true_val : false_val) are also tested heavily. A question might show a for expression transforming a list into a map and ask what the resulting structure looks like, or it might show a broken conditional and ask which value would be returned.

Practice reading these in context. The HCTA practice test environment includes configuration-reading questions that put built-in functions in realistic HCL snippets, which is the most efficient way to build recognition speed.

Dynamic Blocks and Meta-Arguments

Dynamic blocks are among the most misunderstood features in Terraform, and Domain 8 tests them deliberately. A dynamic block allows you to generate repeated nested blocks within a resource configuration based on a collection. The syntax is specific - you must use the correct iterator variable and understand what content refers to inside the dynamic block.

Dynamic Block Anatomy: A dynamic block takes the label of the nested block type it is replacing, uses a for_each argument to iterate over a collection, and uses a content sub-block to define the body. The iterator defaults to the block label name but can be overridden with the iterator argument. Exam questions test whether you know this override exists and why you would use it.

count vs. for_each

The two primary meta-arguments for creating multiple instances of a resource are count and for_each. Domain 8 tests the specific differences: count creates instances identified by index (an integer), while for_each creates instances identified by a key (a string from a set or map). This distinction matters critically when resources are removed from the middle of a list - count renumbers all subsequent resources, potentially causing destructive replacements, while for_each only removes the specific keyed instance.

Expect a question that presents a scenario - a list of resources being managed with count where one item is removed from the middle - and asks what Terraform's plan will show. The correct answer involves understanding resource address changes and planned destructions.

How Domain 8 Questions Are Written

HCTA questions use a multiple-choice and multiple-select format. Domain 8 questions in particular tend toward two styles: configuration-reading questions that show an HCL snippet and ask about behavior or output, and scenario questions that describe a requirement and ask which configuration change correctly satisfies it.

The configuration-reading style is unforgiving of vague understanding. You either know that lookup(map, key, default) returns the default when the key is absent, or you do not. You either know that toset(list) removes duplicates, or you will guess. These questions reward direct familiarity with HCL over conceptual knowledge.

Spotting Distractor Answers: Domain 8 distractors often use syntactically plausible but semantically incorrect options - a function that exists but does the wrong thing, or a meta-argument used in the wrong context. The best defense is working through questions that show actual code, not just reading documentation descriptions.

The scenario style tests whether you can apply Domain 8 knowledge to solve a problem. "Your team needs to create an IAM role for each item in a map of role definitions. Which meta-argument should you use, and how should the resource address be referenced?" This is a Domain 8 question with a Domain 5 (modules) flavor - a reminder that domains are interconnected even when one is the primary driver.

For detailed practice with this question style, the HCTA Domain 8: Read, Generate, and Modify Configuration 2026 guide pairs well with timed practice sets to build both accuracy and speed.

Scheduling Domain 8 in Your Prep Plan

Given its weight and the applied nature of its content, Domain 8 deserves proportionally more study time than any other single domain. A structured approach that maps domains to weeks helps ensure you do not shortchange the highest-value areas.

Week 1

HCL Syntax and Core Block Types

  • Work through Terraform documentation for all core block types
  • Write at least three complete Terraform configurations from scratch
  • Focus on variable type constraints and locals vs output semantics
  • Cover Domains 1, 2, and 3 in parallel (conceptual and foundational, lower weight)
Week 2

Functions, Expressions, and Data Sources

  • Practice for expressions, conditionals, and splat expressions
  • Work through the built-in function categories with Terraform console
  • Cover Domain 6 (Core Workflow) alongside - natural pairing with writing real configs
  • Take a Domain 8 focused practice test to identify gaps
Week 3

Dynamic Blocks, Meta-Arguments, and Module Configuration

  • Deep dive on count vs for_each with concrete examples
  • Dynamic block syntax and iterator overrides
  • Cover Domain 5 (Modules) this week - directly reinforces Domain 8 skills
  • Cover Domain 7 (State) - connect to how configuration changes affect state
Week 4

Review, Integration, and Domain 9

  • Full mixed-domain practice tests from the HCTA practice site
  • Cover Domain 9 (HCP Terraform) - pairs with Domain 8 on remote configuration management
  • Revisit any Domain 8 subtopics that practice tests reveal as weak spots
  • Cover Domains 4 and 8 together for outside-workflow configuration scenarios

Domain 8 does not exist in isolation. Its topics appear as supporting knowledge in several other domains, and understanding those connections helps you study more efficiently.

Domain 5 (Interact with Terraform Modules) at 13% weight is the most direct neighbor. Module authors write configuration that module consumers call. Both sides of that relationship require Domain 8 skills: the author needs to know how to expose variables and outputs correctly; the consumer needs to know how to read and pass values to a module block. Any question about module composition is simultaneously a Domain 8 question about configuration syntax.

Domain 7 (Implement and Maintain State) connects through resource addressing. When you understand how count and for_each generate resource addresses, you understand why configuration changes can trigger unexpected state operations. The moved block - which allows you to refactor resource addresses without destroying and recreating infrastructure - is written in HCL and belongs to both domains conceptually.

Domain 9 (HCP Terraform Capabilities) adds a layer: in remote execution contexts, configuration is still HCL, but variables can be set in the HCP Terraform workspace UI, through the API, or via sensitive variable sets. Understanding how variable precedence works in that environment requires both Domain 8 knowledge (the HCL variable block) and Domain 9 knowledge (workspace settings). The HCTA Domain 9: Understand HCP Terraform Capabilities 2026 guide covers that intersection in detail.

Domain 4 (Use Terraform Outside of Core Workflow) at 8% includes the terraform console command, which is directly relevant to testing HCL expressions and built-in functions interactively. Understanding that you can evaluate a for expression or a function call in the console before embedding it in configuration is both a Domain 4 and Domain 8 skill.

Cross-Domain Leverage: Because Domain 8 underpins so many other domains, time invested in genuine HCL fluency pays dividends across 40%+ of the exam - not just the 16% explicitly labeled Domain 8. Configuration literacy is the foundation the entire credential is built on.

Frequently Asked Questions

Do I need to memorize every Terraform built-in function for Domain 8?

No - memorizing every function is not realistic or necessary. The exam focuses on the functions that appear most commonly in real-world configurations: collection manipulation functions like merge, flatten, and lookup; string functions like format and join; and encoding functions like jsonencode and base64encode. Deep familiarity with those categories, combined with the ability to read a function call and reason about its output, is what Domain 8 actually requires.

Is Domain 8 harder than Domain 7 and Domain 9?

They test different types of difficulty. Domain 7 (State) and Domain 9 (HCP Terraform) involve platform concepts and operational behavior that can be learned declaratively. Domain 8 requires applied language fluency - you have to be able to read and reason about HCL under time pressure. Many candidates find Domain 8 the most challenging precisely because there is no substitute for having actually worked with Terraform configurations in practice.

How much of Domain 8 overlaps with what I use daily as a Terraform practitioner?

If you write Terraform professionally, a substantial portion of Domain 8 will feel familiar. Variables, outputs, data sources, and resource meta-arguments are everyday tools. Where the exam may challenge even experienced practitioners is in the precise details: exact precedence rules, specific edge cases in count vs for_each behavior, and the exact syntax of dynamic blocks and moved blocks. Targeted practice on those specifics is worthwhile even if you have years of Terraform experience.

Does Domain 8 include Terraform provider configuration?

Provider configuration blocks - the provider block type - are part of Domain 8's scope as a core HCL block type. However, provider-specific argument details (the specific arguments for the AWS or Azure providers, for example) are not tested. The exam focuses on the Terraform language layer: how provider blocks are structured, how aliases work, and how provider version constraints are expressed in the required_providers block within the terraform block.

What is the best way to practice Domain 8 skills before the exam?

The most effective practice combines two activities: writing and running actual Terraform configurations in a test environment, and working through configuration-reading questions under timed conditions. The writing builds intuition; the timed questions build the recognition speed the exam rewards. HCTA practice tests include Domain 8 questions with HCL snippets that closely reflect the format and difficulty of the real exam.

Ready to Start Practicing?

Domain 8 is the highest-weighted domain on the HCTA exam - and the one where practice with real HCL scenarios makes the biggest difference. Test your configuration-reading skills right now with HCTA-specific practice questions that mirror the actual exam format.

Start Free Practice Test

Ready to pass your HCTA exam?

Put this into practice with free HCTA questions across every exam domain.