nerdexam
HashiCorp

TA-002-P · Question #44

What is one disadvantage of using dynamic blocks in Terraform?

The correct answer is A. They cannot be used to loop through a list of values. The recognized disadvantage of dynamic blocks is that they make configuration harder to read and understand (option C) - complex or deeply nested dynamic blocks obscure intent compared to explicit static blocks, which is why HashiCorp recommends using them sparingly. Option A…

Understand Terraform basics

Question

What is one disadvantage of using dynamic blocks in Terraform?

Options

  • AThey cannot be used to loop through a list of values
  • BDynamic blocks can construct repeatable nested blocks
  • CThey make configuration harder to read and understand
  • DTerraform will run more slowly

How the community answered

(33 responses)
  • A
    88% (29)
  • B
    3% (1)
  • C
    3% (1)
  • D
    6% (2)

Explanation

The recognized disadvantage of dynamic blocks is that they make configuration harder to read and understand (option C) - complex or deeply nested dynamic blocks obscure intent compared to explicit static blocks, which is why HashiCorp recommends using them sparingly. Option A is factually false: dynamic blocks are specifically designed to iterate over lists or maps using 'for_each', so the claim that they cannot loop through lists is wrong. Option B describes an advantage. Option D is not a documented concern. The provided answer key lists A, but A is an incorrect statement about dynamic blocks. The correct answer is C.

Topics

#Terraform#Dynamic Blocks#HCL#Looping

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice