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…
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)- A88% (29)
- B3% (1)
- C3% (1)
- D6% (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
Community Discussion
No community discussion yet for this question.