Practice AWS provider Dynamic HCL Configuration questions with full explanations on every answer.
Start practicing
Dynamic HCL Configuration — choose a session length
Free · No account required
Click any question to see the full explanation and answer options, or start a focused practice session above.
You are using a dynamic block to define multiple 'tag' blocks inside an AWS resource. The dynamic block is failing because it expects a set of objects but receives a flat list. Which function best prepares your data?
2You are attempting to use a conditional expression to set a variable, but the types returned by the true and false results differ. What happens?
3You have a list of objects representing AWS tags. You need to transform this list into a map for use with a for_each argument. Which function should you use?
4In a dynamic block, you need to access the current iteration item. What is the default label assigned to the iterator object?
5When using for_each on a resource, how do you access the value of the current iteration inside the resource configuration?
6Which function is most useful when you have a nested list of objects and want to create a single flat list to iterate over with for_each?
7You want to optionally create an S3 bucket only if a specific variable 'create_bucket' is set to true. Which HCL feature is best for this?
8You are creating a security group in AWS and need to define multiple ingress rules based on a list of port numbers. Which meta-argument is most appropriate to use to create one resource instance per port?
9What is the primary difference between 'count' and 'for_each' regarding state management?
10What happens if you use a dynamic block with a 'for_each' expression that evaluates to an empty set?
11You are iterating over a map using for_each. You need to access the key of the current map element. Which object do you use?
12You want to pass a complex object type to a module, but you need to ensure specific attributes are present. How do you define this in the variable block?
13Which function allows you to safely access a map value even if the key might not exist?
14You have a list of strings that you want to convert into a set to use with for_each. Which function is preferred?
15In HCL, how do you handle a scenario where a variable might be null but you need to provide a non-null default value for a resource argument?
16When using 'for_each' on a list of strings, what must you do to ensure the configuration is stable?
17Which of these is a valid use case for a dynamic block?
18You are writing a module that accepts a list of objects. You want to validate that the 'port' attribute in each object is a number. How can you enforce this?
19Which meta-argument is best for deploying resources that are strictly dependent on the number of items in a configuration?
20Which TWO of the following are valid meta-arguments for managing resource instances?
21How can you debug the output of a complex 'for' expression in Terraform?
22Which THREE of the following are valid HCL collection types?
23Which TWO of the following are valid uses of the 'for' expression?
24Which TWO of the following statements are correct regarding 'for_each' and state?
25Which THREE of the following are valid ways to transform data for Terraform configuration?
26Which TWO of the following are requirements when using a 'dynamic' block?
27Which TWO of the following functions are most useful for manipulating lists?
28Which THREE of the following represent potential pitfalls when using 'count'?
29Which THREE of the following are valid ways to pass data to a module dynamically?
The Dynamic HCL Configuration domain covers the key concepts tested in this area of the AWS provider exam blueprint published by HashiCorp. Courseiva provides free domain-focused practice, mock exams, missed-question review, and readiness tracking across all AWS provider domains — no account required.
The Courseiva AWS provider question bank contains 29 questions in the Dynamic HCL Configuration domain. Click any question to see the full explanation and answer breakdown.
Start with a 10-question focused session to identify your baseline accuracy in this domain. Read every explanation — even for questions you answer correctly — to understand the reasoning. Once you score consistently above 80%, move to a 20–30 question session to confirm depth before moving to the next domain.
Yes — the session launcher on this page draws questions exclusively from the Dynamic HCL Configuration domain. Choose 10, 20, 30, or 50 questions for a focused session, or click individual questions to review them one by one.
Save your results, see per-domain analytics, and get readiness scores — free, for every certification.
Sign Up FreeFree forever · Every certification included